Skip to content

Instantly share code, notes, and snippets.

@yohgaki
Created July 8, 2016 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yohgaki/8ea096cac118dd1f32e4005c11634a91 to your computer and use it in GitHub Desktop.
Save yohgaki/8ea096cac118dd1f32e4005c11634a91 to your computer and use it in GitHub Desktop.
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index 311d6aa..cad8137 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -836,6 +836,7 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], EL_NAME) && atts[++i] && atts[i][0]) {
+ if (stack->varname) efree(stack->varname);
stack->varname = estrdup(atts[i]);
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment