Skip to content

Commit

Permalink
Fix: memory leak detected by ccc-analyzer
Browse files Browse the repository at this point in the history
Free on error.

Bug Summary
File:	nasl/nasl_func.c
Warning:	line 242, column 3
Potential leak of memory pointed to by 'trace_buf'
  • Loading branch information
jjnicola committed Oct 21, 2022
1 parent 69b93de commit 36bb752
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nasl/nasl_func.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ nasl_func_call (lex_ctxt *lexic, const nasl_func *f, tree_cell *arg_list)
return retc;

error:
g_free (trace_buf)
free_lex_ctxt (lexic2);
return NULL;
}
Expand Down

0 comments on commit 36bb752

Please sign in to comment.