com php-src: avoid this pointers play: win32/sendmail.c
| From: | Anatol Belski | Date: | Tue, 03 Mar 2015 18:30:15 +0000 |
| Subject: | com php-src: avoid this pointers play: win32/sendmail.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85184@lists.php.net to get a copy of this message | ||
Commit: 82fd62df19e4467680bb3601fded911f2e60c574
Author: Anatol Belski <ab@php.net> Tue, 3 Mar 2015 19:30:15 +0100
Parents: 2f79fd8d43967aa3fab7bbbc8a75e2ae13d88445
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=82fd62df19e4467680bb3601fded911f2e60c574
Log:
avoid this pointers play
Changed paths:
M win32/sendmail.c
Diff:
diff --git a/win32/sendmail.c b/win32/sendmail.c
index 6133e76..7dacf5c 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -240,20 +240,15 @@ PHPAPI int TSendMail(char *host, int *error, char **error_message,
if (headers) {
char *pos = NULL;
size_t i;
- zend_string *headers_trim;
/* Use PCRE to trim the header into the right format */
- if (NULL == (headers_trim = php_win32_mail_trim_header(headers))) {
+ if (NULL == (headers_lc = php_win32_mail_trim_header(headers))) {
*error = W32_SM_PCRE_ERROR;
return FAILURE;
}
/* Create a lowercased header for all the searches so we're finally case
* insensitive when searching for a pattern. */
- if (NULL == (headers_lc = zend_string_copy(headers_trim))) {
- *error = OUT_OF_MEMORY;
- return FAILURE;
- }
for (i = 0; i < headers_lc->len; i++) {
headers_lc->val[i] = tolower(headers_lc->val[i]);
}