[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Török Edvin edwin at clamav.net
Sun Apr 4 00:54:52 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 2e0a9ae69583de6113457e4b1313d53dc7278996
Author: Török Edvin <edwin at clamav.net>
Date:   Tue Jun 30 19:40:26 2009 +0300

    fix minor leak

diff --git a/clambc/bcrun.c b/clambc/bcrun.c
index 711f15b..d8fc7cf 100644
--- a/clambc/bcrun.c
+++ b/clambc/bcrun.c
@@ -69,12 +69,14 @@ int main(int argc, char *argv[])
     f = fopen(argv[1], "r");
     if (!f) {
 	fprintf(stderr, "Unable to load %s\n", argv[1]);
+	optfree(opts);
 	exit(2);
     }
 
     bc = malloc(sizeof(*bc));
     if (!bc) {
 	fprintf(stderr, "Out of memory\n");
+	optfree(opts);
 	exit(3);
     }
 
@@ -82,6 +84,7 @@ int main(int argc, char *argv[])
     rc = cli_bytecode_load(bc, f, NULL);
     if (rc != CL_SUCCESS) {
 	fprintf(stderr,"Unable to load bytecode: %s\n", cl_strerror(rc));
+	optfree(opts);
 	exit(4);
     }
     fclose(f);
@@ -99,5 +102,6 @@ int main(int argc, char *argv[])
     cli_bytecode_destroy_context(ctx);
     cli_bytecode_destroy(bc);
     free(bc);
+    optfree(opts);
     return 0;
 }

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list