diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | embed/mozilla/EphyHeaderSniffer.cpp | 5 |
2 files changed, 9 insertions, 2 deletions
@@ -1,5 +1,11 @@ 2004-01-29 Christian Persch <chpe@cvs.gnome.org> + * embed/mozilla/EphyHeaderSniffer.cpp: + + Fix mem leak. + +2004-01-29 Christian Persch <chpe@cvs.gnome.org> + * src/ephy-favicon-action.c: (ephy_favicon_action_set_property), (ephy_favicon_action_get_property): diff --git a/embed/mozilla/EphyHeaderSniffer.cpp b/embed/mozilla/EphyHeaderSniffer.cpp index 8d8e2d0b3..abf0ba931 100644 --- a/embed/mozilla/EphyHeaderSniffer.cpp +++ b/embed/mozilla/EphyHeaderSniffer.cpp @@ -328,8 +328,9 @@ nsresult EphyHeaderSniffer::PerformSave (nsIURI* inOriginalURI) } /* FIXME: how to inform user of failed save ? */ - nsILocalFile *destFile; - BuildDownloadPath (NS_ConvertUCS2toUTF8 (defaultFileName).get(), &destFile); + nsCOMPtr<nsILocalFile> destFile; + BuildDownloadPath (NS_ConvertUCS2toUTF8 (defaultFileName).get(), getter_AddRefs (destFile)); + NS_ENSURE_TRUE (destFile, NS_ERROR_FAILURE); return InitiateDownload (destFile); } |