]> granicus.if.org Git - php/commitdiff
removed the emalloc result check, out of memory will bailout
authorAnatol Belski <ab@php.net>
Sat, 13 Sep 2014 22:00:52 +0000 (00:00 +0200)
committerAnatol Belski <ab@php.net>
Sat, 13 Sep 2014 22:00:52 +0000 (00:00 +0200)
ext/standard/http_fopen_wrapper.c

index d7b62e186d0cca995892a60e5baa285ed5501548..45fa637c0de40ca47929109d7598e0ff4a65752b 100644 (file)
@@ -587,9 +587,6 @@ finish:
                /* ensure the header is only sent if user_agent is not blank */
                if (ua_len > sizeof(_UA_HEADER)) {
                        ua = emalloc(ua_len + 1);
-                       if (NULL == ua) {
-                               return NULL;
-                       }
                        if ((ua_len = slprintf(ua, ua_len, _UA_HEADER, ua_str)) > 0) {
                                ua[ua_len] = 0;
                                php_stream_write(stream, ua, ua_len);