]> granicus.if.org Git - php/commitdiff
Plug a memory leak: retval_ptr should be destroyed.
authorAndrei Zmievski <andrei@php.net>
Fri, 16 Jun 2000 19:53:06 +0000 (19:53 +0000)
committerAndrei Zmievski <andrei@php.net>
Fri, 16 Jun 2000 19:53:06 +0000 (19:53 +0000)
ext/standard/var.c

index ae5c1c4de27566830f7e513e2b7486b46c3f6602..a85a5f37ae9a402ca9dc46df6c23ee0fee15ac28 100644 (file)
@@ -521,6 +521,10 @@ int php_var_unserialize(pval **rval, const char **p, const char *max)
 
                                zval_dtor(fname);
                                FREE_ZVAL(fname);
+                               if (retval_ptr) {
+                                       zval_dtor(retval_ptr);
+                                       FREE_ZVAL(retval_ptr);
+                               }
                        }
 
                        return *((*p)++) == '}';