/pidgin/main: d70b97846c13: Fix a memory leak on a temporary cop...

Jorge Villase?or salinasv at pidgin.im
Tue Oct 6 01:28:50 EDT 2015


Changeset: d70b97846c13488fe4d87f021c2b96a8334cfdd9
Author:	 Jorge Villase?or <salinasv at pidgin.im>
Date:	 2015-10-05 22:17 -0700
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/d70b97846c13

Description:

Fix a memory leak on a temporary copy of the uri

Patch from AnonymousSubmiter on a ticket with small modifications to cover other cases

Fixes #16128

diffstat:

 pidgin/gtkwebview.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (28 lines):

diff --git a/pidgin/gtkwebview.c b/pidgin/gtkwebview.c
--- a/pidgin/gtkwebview.c
+++ b/pidgin/gtkwebview.c
@@ -170,6 +170,7 @@ webview_resource_loading(WebKitWebView *
 		if (!found) {
 			purple_debug_warning("webview", "Invalid purple stock "
 				"image uri: %s", uri);
+			g_free(p_uri);
 			return;
 		}
 
@@ -179,11 +180,15 @@ webview_resource_loading(WebKitWebView *
 
 		if (g_strcmp0(domain, "e2ee") == 0) {
 			img = _pidgin_e2ee_stock_icon_get(stock_name);
-			if (!img)
+			if (!img) {
+				g_free(p_uri);
 				return;
+			}
 		} else {
 			purple_debug_warning("webview", "Invalid purple stock "
 				"image domain: %s", domain);
+
+			g_free(p_uri);
 			return;
 		}
 	} else



More information about the Commits mailing list