cvs: /php4/ext/wddx wddx.c
| From: | Andrei Zmievski | Date: | Sat, 15 Jan 2000 23:35:21 +0000 |
| Subject: | cvs: /php4/ext/wddx wddx.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-9164@lists.php.net to get a copy of this message | ||
andrei Sat Jan 15 15:35:21 2000 EDT
Modified files:
/php4/ext/wddx wddx.c
Log:
(wddx_stack_destroy) Properly free the dangling varname.
(php_wddx_deserialize_ex) There should be only 1 value on the stack after
parser is done.
Index: php4/ext/wddx/wddx.c
diff -u php4/ext/wddx/wddx.c:1.21 php4/ext/wddx/wddx.c:1.22
--- php4/ext/wddx/wddx.c:1.21 Tue Jan 4 06:41:56 2000
+++ php4/ext/wddx/wddx.c Sat Jan 15 15:34:51 2000
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: wddx.c,v 1.21 2000/01/04 14:41:56 andrei Exp $ */
+/* $Id: wddx.c,v 1.22 2000/01/15 23:34:51 andrei Exp $ */
#include "php.h"
#include "php_wddx.h"
@@ -187,6 +187,8 @@
zval_dtor(((st_entry *)stack->elements[i])->data);
efree(((st_entry *)stack->elements[i])->data);
}
+ if (((st_entry *)stack->elements[i])->varname)
+ efree(((st_entry *)stack->elements[i])->varname);
efree(stack->elements[i]);
}
efree(stack->elements);
@@ -727,7 +729,7 @@
XML_ParserFree(parser);
- if (!wddx_stack_is_empty(&stack)) {
+ if (stack.top == 1) {
wddx_stack_top(&stack, (void**)&ent);
*return_value = *(ent->data);
zval_copy_ctor(return_value);