libclamav/blob.c: properly scan files when LeaveTemporaryFiles is enabled (bb#2447)

remotes/push_mirror/multihash
Tomasz Kojm 15 years ago
parent ccaf037ab5
commit 53d41b9793
  1. 5
      ChangeLog
  2. 9
      libclamav/blob.c

@ -1,3 +1,8 @@
Tue Dec 28 13:03:14 CET 2010 (tk)
---------------------------------
* libclamav/blob.c: properly scan files when LeaveTemporaryFiles
is enabled (bb#2447)
Mon Dec 27 15:21:43 CET 2010 (acab)
-----------------------------------
* libclamav/disasm.c: fix movsx/movzx disasm src size (bb#2341)

@ -396,12 +396,6 @@ fileblobCreate(void)
int
fileblobScanAndDestroy(fileblob *fb)
{
if(fb->ctx && fb->ctx->engine->keeptmp) {
/* Can't remove the file, the caller must scan */
fileblobDestroy(fb);
return CL_CLEAN;
}
switch(fileblobScan(fb)) {
case CL_VIRUS:
fileblobDestructiveDestroy(fb);
@ -424,7 +418,8 @@ fileblobDestructiveDestroy(fileblob *fb)
if(fb->fp && fb->fullname) {
fclose(fb->fp);
cli_dbgmsg("fileblobDestructiveDestroy: %s\n", fb->fullname);
cli_unlink(fb->fullname);
if(!fb->ctx || !fb->ctx->engine->keeptmp)
cli_unlink(fb->fullname);
free(fb->fullname);
fb->fp = NULL;
fb->fullname = NULL;

Loading…
Cancel
Save