diff options
author | Lubomír Sedlář <lubomir.sedlar@gmail.com> | 2012-05-12 21:41:55 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2012-05-21 18:02:24 +0800 |
commit | 8b22ab4c219c08b1d4d46f59cf1b60316d5b2392 (patch) | |
tree | 751d4a40021d50e4150de4582b56e7033aab6210 /embed/ephy-web-view.c | |
parent | c60cec78bfb5622e0c5b472078f5952606a0cee4 (diff) | |
download | gsoc2013-epiphany-8b22ab4c219c08b1d4d46f59cf1b60316d5b2392.tar.gz gsoc2013-epiphany-8b22ab4c219c08b1d4d46f59cf1b60316d5b2392.tar.zst gsoc2013-epiphany-8b22ab4c219c08b1d4d46f59cf1b60316d5b2392.zip |
Fix memory leak in ephy_web_view_set_popups_allowed
If ephy_embed_shell_get_embed_single () does not return a correct
manager, a location string is leaked.
https://bugzilla.gnome.org/show_bug.cgi?id=675888
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r-- | embed/ephy-web-view.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index 149ae625d..61c1fe1d3 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -292,9 +292,6 @@ ephy_web_view_set_popups_allowed (EphyWebView *view, EphyPermissionManager *manager; EphyPermission permission; - location = ephy_web_view_get_location (view, TRUE); - g_return_if_fail (location != NULL); - manager = EPHY_PERMISSION_MANAGER (ephy_embed_shell_get_embed_single (embed_shell)); g_return_if_fail (EPHY_IS_PERMISSION_MANAGER (manager)); @@ -302,6 +299,9 @@ ephy_web_view_set_popups_allowed (EphyWebView *view, permission = allowed ? EPHY_PERMISSION_ALLOWED : EPHY_PERMISSION_DENIED; + location = ephy_web_view_get_location (view, TRUE); + g_return_if_fail (location != NULL); + ephy_permission_manager_add_permission (manager, location, EPHY_PERMISSION_TYPE_POPUP, permission); |