Skip to content

Commit

Permalink
Merge pull request #2003 from 0intro/probe_item_collect_leak
Browse files Browse the repository at this point in the history
Fix leak of item in probe_item_collect
  • Loading branch information
jan-cerny authored Jul 20, 2023
2 parents 9f83ba0 + 8359208 commit cd310d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/OVAL/probes/probe/icache.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,11 @@ int probe_item_collect(struct probe_ctx *ctx, SEXP_t *item)
memcheck_ret = probe_cobj_memcheck(cobj_itemcnt, ctx->max_mem_ratio);
if (memcheck_ret == -1) {
dE("Failed to check available memory");
SEXP_free(item);
return -1;
}
if (memcheck_ret == 1) {
SEXP_free(item);

/*
* Don't set the message again if the collected object is
Expand Down

0 comments on commit cd310d8

Please sign in to comment.