summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2009-01-06 01:27:06 +0100
committerAlbert Astals Cid <aacid@kde.org>2009-01-06 01:27:06 +0100
commit940d060a14712c09da427e2fac4ec579f7291b0f (patch)
tree219333c7cdfadf0222b3782e32529dfec0eeaef4 /utils
parent7be9198adb940ad7c5fffc6db0158cf7042e1b8f (diff)
do not leak fName if fopen fails
Diffstat (limited to 'utils')
-rw-r--r--utils/HtmlOutputDev.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 19dcf7e7..bda3846f 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -1204,6 +1204,7 @@ void HtmlOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
++imgNum;
if (!(f1 = fopen(fName->getCString(), "wb"))) {
error(-1, "Couldn't open image file '%s'", fName->getCString());
+ delete fName;
return;
}
@@ -1292,6 +1293,7 @@ void HtmlOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
if (!(f1 = fopen(fName->getCString(), "wb"))) {
error(-1, "Couldn't open image file '%s'", fName->getCString());
+ delete fName;
return;
}
@@ -1332,6 +1334,7 @@ void HtmlOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
// Open the image file
if (!(f1 = fopen(fName->getCString(), "wb"))) {
error(-1, "Couldn't open image file '%s'", fName->getCString());
+ delete fName;
return;
}