]> granicus.if.org Git - php/commitdiff
Initialize the complete struct
authorMarcus Boerger <helly@php.net>
Sun, 28 Mar 2004 21:09:37 +0000 (21:09 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 28 Mar 2004 21:09:37 +0000 (21:09 +0000)
Zend/zend.c

index 5d177bd8283b62b3d047dd46e675def9a0154e22..c01d0d9ac610c17abb65ede9b0ac7d078abcb89d 100644 (file)
@@ -405,7 +405,7 @@ static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
 
 static void register_standard_class(TSRMLS_D)
 {
-       zend_standard_class_def = malloc(sizeof(zend_class_entry));
+       zend_standard_class_def = calloc(1, sizeof(zend_class_entry));
 
        zend_standard_class_def->type = ZEND_INTERNAL_CLASS;
        zend_standard_class_def->name_length = sizeof("stdClass") - 1;