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

Jorge Villase?or <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: d70b97846c13488fe4d87f021c2b96a8334cfdd9
Author:	 Jorge Villase?or <[email protected]>
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

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.