Skip to content

Commit cac1364

Browse files
authored
Merge pull request #1205 from jan-cerny/def31to36
Plug memory leaks
2 parents 905fe3c + 71a04b9 commit cac1364

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/OVAL/probes/independent/textfilecontent54_probe.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,12 @@ int textfilecontent54_probe_main(probe_ctx *ctx, void *arg)
347347
SEXP_t *ent_val;
348348
ent_val = probe_ent_getval(patt_ent);
349349
pfd.pattern = SEXP_string_cstr(ent_val);
350-
if (pfd.pattern == NULL) {
351-
return -1;
352-
}
353350
SEXP_free(patt_ent);
354351
SEXP_free(ent_val);
352+
if (pfd.pattern == NULL) {
353+
ret = -1;
354+
goto cleanup;
355+
}
355356

356357
/* wtf?
357358
i_val = s_val = "0";

0 commit comments

Comments
 (0)