Skip to content

Commit 69e7d7c

Browse files
committed
Move line with check in textfilecontent.c to ensure that memory is freed, if "assume_d" fails.
1 parent a9c6bb1 commit 69e7d7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/OVAL/probes/independent/textfilecontent.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ int probe_main(probe_ctx *ctx, void *arg)
373373
SEXP_t *ent_val;
374374
ent_val = probe_ent_getval(line_ent);
375375
pattern = SEXP_string_cstr(ent_val);
376-
assume_d(pattern != NULL, -1);
377376
SEXP_vfree(line_ent, ent_val, NULL);
377+
assume_d(pattern != NULL, -1);
378378

379379
/* behaviours are not important if filepath is used */
380380
if(filepath_ent != NULL && behaviors_ent != NULL) {

0 commit comments

Comments
 (0)