Skip to content

Commit

Permalink
Fix use after free (#622)
Browse files Browse the repository at this point in the history
Signed-off-by: Tristan Partin <[email protected]>
  • Loading branch information
tristan957 authored Feb 21, 2023
1 parent 6a109e8 commit 6d94259
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/hsettp/hsettp.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ handle_error(
assert(cJSON_IsNumber(entry));
err = cJSON_GetNumberValue(entry);

cJSON_Delete(body);

fprintf(
stderr, "%s: %s:%d: %s (%ld): %s (%d)\n", progname, file, lineno, title, status, detail,
err);

cJSON_Delete(body);

*(bool *)arg = true;

return merr(EIO);
Expand Down

0 comments on commit 6d94259

Please sign in to comment.