mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 19:46:22 +00:00
fixed memory leaks
Also avoided several NULL pointer dereferences.
This commit is contained in:
@@ -80,7 +80,7 @@ notify_invite(const char * const from, const char * const room,
|
||||
|
||||
_notify(message->str, 10000, "Incoming message");
|
||||
|
||||
g_string_free(message, FALSE);
|
||||
g_string_free(message, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -102,7 +102,7 @@ notify_room_message(const char * const handle, const char * const room, int win)
|
||||
|
||||
_notify(text->str, 10000, "incoming message");
|
||||
|
||||
g_string_free(text, FALSE);
|
||||
g_string_free(text, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -111,7 +111,7 @@ notify_subscription(const char * const from)
|
||||
GString *message = g_string_new("Subscription request: \n");
|
||||
g_string_append(message, from);
|
||||
_notify(message->str, 10000, "Incomming message");
|
||||
g_string_free(message, FALSE);
|
||||
g_string_free(message, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user