aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyHeaderSniffer.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-01-30 02:00:33 +0800
committerChristian Persch <chpe@src.gnome.org>2004-01-30 02:00:33 +0800
commit81522e96e9c996c50fefef0b9604853a7d9a8fab (patch)
treeb02930414c0f763eee43e2a6eb79d3ef25b7b685 /embed/mozilla/EphyHeaderSniffer.cpp
parentf180950b607535839b49815158e0981556148625 (diff)
downloadgsoc2013-epiphany-81522e96e9c996c50fefef0b9604853a7d9a8fab.tar
gsoc2013-epiphany-81522e96e9c996c50fefef0b9604853a7d9a8fab.tar.gz
gsoc2013-epiphany-81522e96e9c996c50fefef0b9604853a7d9a8fab.tar.bz2
gsoc2013-epiphany-81522e96e9c996c50fefef0b9604853a7d9a8fab.tar.lz
gsoc2013-epiphany-81522e96e9c996c50fefef0b9604853a7d9a8fab.tar.xz
gsoc2013-epiphany-81522e96e9c996c50fefef0b9604853a7d9a8fab.tar.zst
gsoc2013-epiphany-81522e96e9c996c50fefef0b9604853a7d9a8fab.zip
Fix mem leak.
2004-01-29 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphyHeaderSniffer.cpp: Fix mem leak.
Diffstat (limited to 'embed/mozilla/EphyHeaderSniffer.cpp')
-rw-r--r--embed/mozilla/EphyHeaderSniffer.cpp5
1 files changed, 3 insertions, 2 deletions
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);
}