Fixed double free
This commit is contained in:
@@ -70,9 +70,6 @@ XMPPStanza *
|
||||
parse_stanza(char *stanza_text)
|
||||
{
|
||||
depth = 0;
|
||||
if (curr_stanza) {
|
||||
stanza_free(curr_stanza);
|
||||
}
|
||||
XML_Parser parser = XML_ParserCreate(NULL);
|
||||
XML_SetElementHandler(parser, start_element, end_element);
|
||||
XML_SetCharacterDataHandler(parser, handle_data);
|
||||
|
||||
@@ -49,8 +49,8 @@ prime_free_all(void)
|
||||
if (idstubs) {
|
||||
g_hash_table_destroy(idstubs);
|
||||
}
|
||||
idstubs = NULL;
|
||||
|
||||
querystubs = NULL;
|
||||
if (querystubs) {
|
||||
g_hash_table_destroy(querystubs);
|
||||
}
|
||||
|
||||
@@ -232,8 +232,6 @@ query_callback(const char *query, const char *id)
|
||||
stanza_set_id(stanza, id);
|
||||
char *stream = stanza_to_string(stanza);
|
||||
write_stream(stream);
|
||||
|
||||
stanza_free(stanza);
|
||||
free(stream);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user