]> sigrok.org Git - libsigrok.git/commitdiff
Close zip file at end of sr_session_file_check.
authorMartin Ling <redacted>
Wed, 20 Aug 2014 11:58:33 +0000 (12:58 +0100)
committerBert Vermeulen <redacted>
Wed, 20 Aug 2014 12:48:29 +0000 (14:48 +0200)
From patch sent to sigrok-devel by jerryxjtu.

src/session_file.c

index e395e72e7de2f0b1808b0590e516431f6ad46459..9298abefc39e1fd1145d9beea7f60c2370bb995d 100644 (file)
@@ -94,6 +94,11 @@ SR_PRIV int sr_sessionfile_check(const char *filename)
                return SR_ERR;
        }
 
+       if ((ret = zip_close(archive)) == -1) {
+               sr_dbg("error closing zipfile: %s", zip_strerror(archive));
+               return SR_ERR;
+       }
+
        return SR_OK;
 }