projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
381459f
)
smtp_mail: fixed another memory leak
author
Steve Holme
<steve_holme@hotmail.com>
Fri, 30 Sep 2011 09:11:56 +0000
(10:11 +0100)
committer
Daniel Stenberg
<daniel@haxx.se>
Mon, 3 Oct 2011 20:55:25 +0000
(22:55 +0200)
... introduced in
7f304ab84f560c
lib/smtp.c
patch
|
blob
|
history
diff --git
a/lib/smtp.c
b/lib/smtp.c
index
dbfc589
..
75b008e
100644
(file)
--- a/
lib/smtp.c
+++ b/
lib/smtp.c
@@
-808,12
+808,15
@@
static CURLcode smtp_mail(struct connectdata *conn)
if(conn->data->set.infilesize > 0) {
size = aprintf("%" FORMAT_OFF_T, data->set.infilesize);
- if(!size)
+ if(!size) {
+ Curl_safefree(from);
+
return CURLE_OUT_OF_MEMORY;
+ }
}
/* send MAIL FROM */
- if(
size == NULL
)
+ if(
!size
)
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "MAIL FROM:%s", from);
else
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "MAIL FROM:%s SIZE=%s",