Browse code

bb#1141 - sis.c

git-svn: trunk@4123

aCaB authored on 2008/08/21 03:15:27
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Wed Aug 20 20:09:11 CEST 2008 (acab)
2
+------------------------------------
3
+  * libclamav/sis.c: fix fd feak on error path - bb#1141
4
+
1 5
 Wed Aug 20 10:54:24 CEST 2008 (tk)
2 6
 ----------------------------------
3 7
   * clamd/clamd.c: return an error (instead of a warning) if
... ...
@@ -506,6 +506,7 @@ static int real_scansis(FILE *f, cli_ctx *ctx, const char *tmpd) {
506 506
 	    return CL_EIO;
507 507
 	  }
508 508
 	  if (cli_writen(fd, decomp, olen)!=(int)olen) {
509
+	    close(fd);
509 510
 	    free(decomp);
510 511
 	    free(ptrs);
511 512
 	    free(alangs);