diff options
author | Albert Astals Cid <aacid@kde.org> | 2011-08-30 20:36:03 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2011-08-30 20:36:03 +0200 |
commit | d584b54eff52c47f983947b2aff0967dfed0ccf9 (patch) | |
tree | 216d6976087c70ffaebdef18c703d786ab98796f /goo | |
parent | 6364c50ffb4053cc30cecbefff7a3142cab8c50b (diff) |
xpdf303: set to NULL on failure
Diffstat (limited to 'goo')
-rw-r--r-- | goo/gfile.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/goo/gfile.cc b/goo/gfile.cc index 0a23f502..2e4271fd 100644 --- a/goo/gfile.cc +++ b/goo/gfile.cc @@ -511,6 +511,7 @@ GBool openTempFile(GooString **name, FILE **f, const char *mode) { *name = new GooString(s); if (!(*f = fopen((*name)->getCString(), mode))) { delete (*name); + *name = NULL; return gFalse; } return gTrue; @@ -536,6 +537,7 @@ GBool openTempFile(GooString **name, FILE **f, const char *mode) { #endif // HAVE_MKSTEMP if (fd < 0 || !(*f = fdopen(fd, mode))) { delete *name; + *name = NULL; return gFalse; } return gTrue; |