Skip to content

Commit

Permalink
Fix: possible memory leak detected via ccc-analyzer
Browse files Browse the repository at this point in the history
Free frame, allocated in forge_frame. Members don't need to be free()'d.

Bug Summary
File:	nasl/nasl_frame_forgery.c
Warning:	line 545, column 13
Potential leak of memory pointed to by 'frame'
  • Loading branch information
jjnicola committed Oct 21, 2022
1 parent fc35c87 commit 6073025
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nasl/nasl_frame_forgery.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ nasl_send_arp_request (lex_ctxt *lexic)

answer_sz =
send_frame ((const u_char *) frame, frame_sz, 1, to, filter, dst, &answer);
g_free (frame);
if (answer_sz == -2)
{
g_message ("%s: Not possible to send the frame", __func__);
Expand Down

0 comments on commit 6073025

Please sign in to comment.