fix: Resolve memory leak in stanza_parse by freeing parse state #2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user