Browse code

fd leak

git-svn: trunk@4008

aCaB authored on 2008/07/28 22:23:12
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Mon Jul 28 15:05:01 CEST 2008 (acab)
2
+------------------------------------
3
+  * libclamav/pe.c: fix fd leak - thx sherpya
4
+
1 5
 Mon Jul 28 12:50:54 CEST 2008 (tk)
2 6
 ----------------------------------
3 7
   * database/Makefile.am: add check for .cld files (bb#1088)
... ...
@@ -55,6 +55,7 @@
55 55
 #include "upack.h"
56 56
 #include "matcher.h"
57 57
 #include "matcher-bm.h"
58
+#include "disasm.h"
58 59
 
59 60
 #ifndef	O_BINARY
60 61
 #define	O_BINARY	0
... ...
@@ -894,6 +895,7 @@ int cli_scanpe(int desc, cli_ctx *ctx)
894 894
 
895 895
     CLI_UNPTEMP("DISASM",(exe_sections,0));
896 896
     disasmbuf(epbuff, epsize, ndesc);
897
+    close(ndesc);
897 898
     CLI_TMPUNLK();
898 899
 
899 900
     /* Attempt to detect some popular polymorphic viruses */