cli_unrar_close() was being called too early

git-svn: trunk@2636
This commit is contained in:
Tomasz Kojm 2007-01-20 11:38:54 +00:00
parent 88fbd2743a
commit cf68af72b9
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Sat Jan 20 12:36:53 CET 2007 (tk)
---------------------------------
* libclamav/scanners.c: cli_unrar_close() was being called too early
Fri Jan 19 19:48:29 GMT 2007 (njh) Fri Jan 19 19:48:29 GMT 2007 (njh)
---------------------------------- ----------------------------------
* libclamav/pdf.c: Improved error messages * libclamav/pdf.c: Improved error messages

View file

@ -278,12 +278,13 @@ static int cli_scanrar(int desc, cli_ctx *ctx, off_t sfx_offset, uint32_t *sfx_c
if(ret == CL_BREAK) if(ret == CL_BREAK)
ret = CL_CLEAN; ret = CL_CLEAN;
cli_unrar_close(&rar_state);
metadata = metadata_tmp = rar_state.metadata; metadata = metadata_tmp = rar_state.metadata;
if(cli_scandir(rar_state.comment_dir, ctx) == CL_VIRUS) if(cli_scandir(rar_state.comment_dir, ctx) == CL_VIRUS)
ret = CL_VIRUS; ret = CL_VIRUS;
cli_unrar_close(&rar_state);
if(!cli_leavetemps_flag) if(!cli_leavetemps_flag)
cli_rmdirs(dir); cli_rmdirs(dir);