Merge pull request 'fix: Resolve memory leak in stanza_parse by freeing parse state' (#2) from fix/memory-leak-stanza-parse into master

No functional changes to the parsing behavior
This commit is contained in:
2025-12-24 12:38:15 +00:00

View File

@@ -299,7 +299,9 @@ stanza_parse(char *stanza_text)
XML_Parse(parser, stanza_text, strlen(stanza_text), 0);
XML_ParserFree(parser);
return state->curr_stanza;
XMPPStanza *result = state->curr_stanza;
free(state);
return result;
}
static void