]> granicus.if.org Git - php/commitdiff
allocate_new_resource() handles the malloc() for us. Don't leak by mallocing twice.
authorSara Golemon <pollita@php.net>
Mon, 29 Aug 2005 21:53:34 +0000 (21:53 +0000)
committerSara Golemon <pollita@php.net>
Mon, 29 Aug 2005 21:53:34 +0000 (21:53 +0000)
TSRM/TSRM.c

index 5eb8f3a06d370ccf86f0aa2897c713922d5ffa64..208d5e95d3de7123ec2e669435dbd24175c8983b 100644 (file)
@@ -430,7 +430,6 @@ void *tsrm_new_interpreter_context(void)
 
        current = tsrm_tls_get();
 
-       new_ctx = malloc(sizeof(*new_ctx));
        allocate_new_resource(&new_ctx, thread_id);
        
        /* switch back to the context that was in use prior to our creation