diff options
Diffstat (limited to 'embed')
-rw-r--r-- | embed/mozilla/MozRegisterComponents.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp index aa06d9353..aac33b00e 100644 --- a/embed/mozilla/MozRegisterComponents.cpp +++ b/embed/mozilla/MozRegisterComponents.cpp @@ -78,12 +78,13 @@ RegisterContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath, NS_ENSURE_TRUE (cm, NS_ERROR_FAILURE); nsresult rv; - char *oldval; + char *oldval = nsnull; rv = cm->AddCategoryEntry ("content-policy", EPHY_CONTENT_POLICY_CONTRACTID, EPHY_CONTENT_POLICY_CONTRACTID, PR_TRUE, PR_TRUE, &oldval); - nsMemory::Free (oldval); + if (oldval) + nsMemory::Free (oldval); return rv; } |