Skip to content

Commit

Permalink
Fix invalid free in main()
Browse files Browse the repository at this point in the history
data is allocated by mmap() in prepare_data().

Resolves: #173
Signed-off-by: Robbie Harwood <[email protected]>
  • Loading branch information
frozencemetery committed Apr 18, 2022
1 parent df09b47 commit 6be2cb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/efivar.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ int main(int argc, char *argv[])
if (sz < 0)
err(1, "Could not import data from \"%s\"", infile);

free(data);
munmap(data, data_size);
data = NULL;
data_size = 0;

Expand Down

0 comments on commit 6be2cb1

Please sign in to comment.