projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fda2c2c
)
fix double-free when there are multiple mxes
author
Art Cancro
<ajc@citadel.org>
Fri, 7 Apr 2017 12:35:58 +0000
(08:35 -0400)
committer
Art Cancro
<ajc@citadel.org>
Fri, 7 Apr 2017 12:35:58 +0000
(08:35 -0400)
citadel/modules/smtp/serv_smtpclient.c
patch
|
blob
|
history
diff --git
a/citadel/modules/smtp/serv_smtpclient.c
b/citadel/modules/smtp/serv_smtpclient.c
index a7fb3052e54f3525d0983934d84f9f939a83059b..bfe665984698ee69922f2843b03779ad30924c28 100644
(file)
--- a/
citadel/modules/smtp/serv_smtpclient.c
+++ b/
citadel/modules/smtp/serv_smtpclient.c
@@
-261,10
+261,10
@@
int smtp_attempt_delivery(long msgid, char *recp, char *envelope_from)
response_code = 421;
}
- if (recipients != NULL) {
curl_slist_free_all(recipients);
- }
- curl_easy_cleanup(curl);
+ recipients = NULL; // this gets reused; avoid double-free
+ curl_easy_cleanup(curl);
+ curl = NULL; // this gets reused; avoid double-free
}
}