]> granicus.if.org Git - php/commitdiff
avoid this pointers play
authorAnatol Belski <ab@php.net>
Tue, 3 Mar 2015 18:30:15 +0000 (19:30 +0100)
committerAnatol Belski <ab@php.net>
Tue, 3 Mar 2015 18:30:15 +0000 (19:30 +0100)
win32/sendmail.c

index 6133e76c9927270199c0185ccb112a8e961d4909..7dacf5ce419a9ecb7b903576b85184fe7de1f3de 100644 (file)
@@ -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]);
                }