/pidgin/main: b61329019afe: Ad a check to make sure that connect...

Daniel Atallah datallah at pidgin.im
Wed Jun 10 21:01:29 EDT 2015


Changeset: b61329019afe03b4a3140df787168cfbaa98a397
Author:	 Daniel Atallah <datallah at pidgin.im>
Date:	 2015-06-10 21:00 -0400
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/b61329019afe

Description:

Ad a check to make sure that connect_data is valid before freeing it to avoid double-frees

 * Fixes #16536

diffstat:

 libpurple/proxy.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff --git a/libpurple/proxy.c b/libpurple/proxy.c
--- a/libpurple/proxy.c
+++ b/libpurple/proxy.c
@@ -568,6 +568,9 @@ purple_win32_proxy_get_info(void)
 static void
 purple_proxy_connect_data_destroy(PurpleProxyConnectData *connect_data)
 {
+	if (!PURPLE_PROXY_CONNECT_DATA_IS_VALID(connect_data))
+		return;
+
 	handles = g_slist_remove(handles, connect_data);
 
 	if (connect_data->query_data != NULL)



More information about the Commits mailing list