]> granicus.if.org Git - php/commitdiff
Fix leak when creating timezone with null bytes
authorNikita Popov <nikic@php.net>
Thu, 14 Jul 2016 15:43:29 +0000 (17:43 +0200)
committerNikita Popov <nikic@php.net>
Thu, 14 Jul 2016 16:39:16 +0000 (18:39 +0200)
ext/date/php_date.c

index f494d6cfafe5145c0714b653dcd0bad59f5a905e..dbcd9d0404e7a7a0e48615827ba77892bce9238e 100644 (file)
@@ -3611,6 +3611,7 @@ static int timezone_initialize(php_timezone_obj *tzobj, /*const*/ char *tz, size
 
        if (strlen(tz) != tz_len) {
                php_error_docref(NULL, E_WARNING, "Timezone must not contain null bytes");
+               efree(dummy_t);
                return FAILURE;
        }