fix: Free XMPPStanza objects in verify_any and verify_last
The XMPPStanza objects created by stanza_parse() in verify_any() and verify_last() functions were never freed, causing memory leaks. This fix adds stanza_free(stanza) calls before the return statements to properly release the allocated stanza resources.
This commit is contained in:
@@ -72,6 +72,7 @@ verify_any(char *stanza_text, gboolean ign_timeout)
|
|||||||
log_println(STBBR_LOGINFO, "VERIFY FAIL: %s", stanza_text);
|
log_println(STBBR_LOGINFO, "VERIFY FAIL: %s", stanza_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stanza_free(stanza);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,5 +107,6 @@ verify_last(char *stanza_text)
|
|||||||
stanzas_debug_last();
|
stanzas_debug_last();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stanza_free(stanza);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user