aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2004-12-19 21:06:35 +0800
committerChristian Persch <chpe@src.gnome.org>2004-12-19 21:06:35 +0800
commit86853c6e1768fc5e6aa86454f60d4a4b976ee290 (patch)
treea8512492425248e23c0da564605300148d996597 /embed/mozilla
parentc9d52a9e07b37eba315d0ad4b41172a8369ba8d5 (diff)
downloadgsoc2013-epiphany-86853c6e1768fc5e6aa86454f60d4a4b976ee290.tar
gsoc2013-epiphany-86853c6e1768fc5e6aa86454f60d4a4b976ee290.tar.gz
gsoc2013-epiphany-86853c6e1768fc5e6aa86454f60d4a4b976ee290.tar.bz2
gsoc2013-epiphany-86853c6e1768fc5e6aa86454f60d4a4b976ee290.tar.lz
gsoc2013-epiphany-86853c6e1768fc5e6aa86454f60d4a4b976ee290.tar.xz
gsoc2013-epiphany-86853c6e1768fc5e6aa86454f60d4a4b976ee290.tar.zst
gsoc2013-epiphany-86853c6e1768fc5e6aa86454f60d4a4b976ee290.zip
Fix a mem leak
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/MozRegisterComponents.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp
index 2da1c541a..aa06d9353 100644
--- a/embed/mozilla/MozRegisterComponents.cpp
+++ b/embed/mozilla/MozRegisterComponents.cpp
@@ -77,12 +77,14 @@ RegisterContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath,
do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
NS_ENSURE_TRUE (cm, NS_ERROR_FAILURE);
+ nsresult rv;
char *oldval;
- return cm->AddCategoryEntry("content-policy",
- EPHY_CONTENT_POLICY_CONTRACTID,
- EPHY_CONTENT_POLICY_CONTRACTID,
- PR_TRUE, PR_TRUE, &oldval);
+ rv = cm->AddCategoryEntry ("content-policy",
+ EPHY_CONTENT_POLICY_CONTRACTID,
+ EPHY_CONTENT_POLICY_CONTRACTID,
+ PR_TRUE, PR_TRUE, &oldval);
nsMemory::Free (oldval);
+ return rv;
}
static const nsModuleComponentInfo sAppComps[] = {