summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorMarkus Fischer <mfischer@php.net>2002-06-03 14:39:30 +0000
committerMarkus Fischer <mfischer@php.net>2002-06-03 14:39:30 +0000
commit44afb19d40010f41fd0eb912e64353ad6669d88d (patch)
tree24533057e15900de5993848febf506fde109fdba /win32
parent504d7c2ebdea68137ddf1b759037538f3168c670 (diff)
downloadphp-git-44afb19d40010f41fd0eb912e64353ad6669d88d.tar.gz
- Fix a leak and a crash.
Diffstat (limited to 'win32')
-rw-r--r--win32/sendmail.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/win32/sendmail.c b/win32/sendmail.c
index 4266aa7509..3043e87e28 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -564,26 +564,25 @@ int PostHeader(char *RPath, char *Subject, char *mailTo, char *xheaders, char *m
}
}
+ if (headers_lc) {
+ efree(headers_lc);
+ }
if ((res = Post(header_buffer)) != SUCCESS) {
efree(header_buffer);
- if (headers_lc) {
- efree(headers_lc);
- }
return (res);
}
efree(header_buffer);
if ((res = Post("\r\n")) != SUCCESS) {
- if (headers_lc) {
- efree(headers_lc);
- }
return (res);
}
return (SUCCESS);
PostHeader_outofmem:
- efree(headers_lc);
+ if (headers_lc) {
+ efree(headers_lc);
+ }
return OUT_OF_MEMORY;
}