helly           Fri Mar 11 20:44:04 2005 EDT

  Modified files:              
    /php-src/ext/wddx   wddx.c 
  Log:
  - Fix memleak
  
http://cvs.php.net/diff.php/php-src/ext/wddx/wddx.c?r1=1.112&r2=1.113&ty=u
Index: php-src/ext/wddx/wddx.c
diff -u php-src/ext/wddx/wddx.c:1.112 php-src/ext/wddx/wddx.c:1.113
--- php-src/ext/wddx/wddx.c:1.112       Mon Jul 19 03:19:47 2004
+++ php-src/ext/wddx/wddx.c     Fri Mar 11 20:44:04 2005
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: wddx.c,v 1.112 2004/07/19 07:19:47 andi Exp $ */
+/* $Id: wddx.c,v 1.113 2005/03/12 01:44:04 helly Exp $ */
 
 #include "php.h"
 
@@ -1014,6 +1014,7 @@
                                decoded = xml_utf8_decode(s, len, &decoded_len, 
"ISO-8859-1");
 
                                if (Z_STRLEN_P(ent->data) == 0) {
+                                       STR_FREE(Z_STRVAL_P(ent->data));
                                        Z_STRVAL_P(ent->data) = 
estrndup(decoded, decoded_len);
                                        Z_STRLEN_P(ent->data) = decoded_len;
                                } else {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to