fix: Resolve memory leak in stanza_parse by freeing parse state

This commit is contained in:
2025-12-24 15:34:26 +03:00
parent 00f47a1598
commit 9a41c959ca

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