Skip to content

Commit

Permalink
Fix memory leaked when GETD2 returns without freeing original_filename.
Browse files Browse the repository at this point in the history
  • Loading branch information
ragusaa authored and micahsnyder committed Aug 18, 2021
1 parent a868a7a commit 8fd1c66
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions libclamav/sis.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,12 @@ enum {
smax = tmp; \
if (((size_t)-1) == tmp) { \
cli_dbgmsg("SIS: Read failed during GETD2\n"); \
FREE(alangs); \
FREE(ptrs); \
return CL_CLEAN; \
status = CL_CLEAN; \
goto done; \
} else if ((smax += sleft) < 4) { \
cli_dbgmsg("SIS: EOF\n"); \
FREE(alangs); \
FREE(ptrs); \
return CL_CLEAN; \
status = CL_CLEAN; \
goto done; \
} \
pos += smax - sleft; \
sleft = smax; \
Expand Down

0 comments on commit 8fd1c66

Please sign in to comment.