corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmke...@apache.org
Subject [08/10] incubator-corinthia git commit: DFZip: Fix uninitialised variable warning
Date Fri, 02 Jan 2015 13:50:17 GMT
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/stable
Commit: 69a802864f077258bc733426e95e9a9b2814876f
Parents: f93d1a5
Author: Peter Kelly <peter@uxproductivity.com>
Authored: Fri Jan 2 20:37:26 2015 +0700
Committer: Peter Kelly <peter@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;
 }


Mime
View raw message