Fixed double free

This commit is contained in:
James Booth
2015-06-02 00:41:35 +01:00
parent 1ab2713bc5
commit 202c4946a6
3 changed files with 1 additions and 6 deletions

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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);
}
}