You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by pm...@apache.org on 2015/01/02 14:47:20 UTC

[2/3] incubator-corinthia git commit: DFZip: Fix uninitialised variable warning

DFZip: Fix uninitialised variable warning


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/69a80286
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/69a80286
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/69a80286

Branch: refs/heads/master
Commit: 69a802864f077258bc733426e95e9a9b2814876f
Parents: f93d1a5
Author: Peter Kelly <pe...@uxproductivity.com>
Authored: Fri Jan 2 20:37:26 2015 +0700
Committer: Peter Kelly <pe...@uxproductivity.com>
Committed: Fri Jan 2 20:37:26 2015 +0700

----------------------------------------------------------------------
 DocFormats/core/src/lib/DFZipFile.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/69a80286/DocFormats/core/src/lib/DFZipFile.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFZipFile.c b/DocFormats/core/src/lib/DFZipFile.c
index 1057ad0..8bc0bcb 100644
--- a/DocFormats/core/src/lib/DFZipFile.c
+++ b/DocFormats/core/src/lib/DFZipFile.c
@@ -94,7 +94,7 @@ int DFZip(const char *zipFilename, DFStorage *storage, DFError **error)
     const char **allPaths = NULL;
     DFBuffer *content = NULL;
     int ok = 0;
-    DFextZipHandleP zipHandle;
+    DFextZipHandleP zipHandle = NULL;
 
     allPaths = DFStorageList(storage,error);
     if (allPaths == NULL || !(zipHandle = DFextZipOpen(zipFilename, 0)))
@@ -123,6 +123,7 @@ int DFZip(const char *zipFilename, DFStorage *storage, DFError **error)
 end:
     DFBufferRelease(content);
     free(allPaths);
-    DFextZipClose(zipHandle);
+    if (zipHandle != NULL)
+        DFextZipClose(zipHandle);
     return ok;
 }