From: Martin Ling Date: Wed, 20 Aug 2014 11:58:33 +0000 (+0100) Subject: Close zip file at end of sr_session_file_check. X-Git-Tag: libsigrok-0.4.0~1133 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=aba57f3550b8d377e96dd47f5d555148851ab639;p=libsigrok.git Close zip file at end of sr_session_file_check. From patch sent to sigrok-devel by jerryxjtu. --- diff --git a/src/session_file.c b/src/session_file.c index e395e72e..9298abef 100644 --- a/src/session_file.c +++ b/src/session_file.c @@ -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; }