mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-28 23:46:22 +00:00
Fix some more memory leaks + an invalid read.
`ProfMessage` was not completely initialized, fix this by using `calloc()` for the allocation. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
@@ -66,9 +66,19 @@ static int _bookmark_result_id_handler(xmpp_stanza_t* const stanza, void* const
|
||||
static void _bookmark_destroy(Bookmark* bookmark);
|
||||
static void _send_bookmarks(void);
|
||||
|
||||
static void
|
||||
_bookmark_shutdown(void)
|
||||
{
|
||||
if (bookmarks) {
|
||||
g_hash_table_destroy(bookmarks);
|
||||
}
|
||||
autocomplete_free(bookmark_ac);
|
||||
}
|
||||
|
||||
void
|
||||
bookmark_request(void)
|
||||
{
|
||||
prof_add_shutdown_routine(_bookmark_shutdown);
|
||||
if (bookmarks) {
|
||||
g_hash_table_destroy(bookmarks);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user