Skip to content

Commit

Permalink
Merge pull request #174 from zvr/hash
Browse files Browse the repository at this point in the history
freeing memory
  • Loading branch information
zvr authored Mar 21, 2023
2 parents 36a4035 + 435d1f3 commit 6c79eb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ hash_file_contents(char *name, size_t sz)
EVP_DigestUpdate(ctx, buf, sz);
EVP_DigestFinal_ex(ctx, hash, NULL);

EVP_MD_CTX_free(ctx);

close(fd);

if (munmap(buf, sz) < 0) {
Expand Down
2 changes: 2 additions & 0 deletions src/record.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ record_process_start(pid_t pid, char *poutname)
record_triple(poutname, "a", "b:process", false);
record_triple(poutname, "b:cmd", cmd_line, true);
record_triple(poutname, "b:start", tbuf, true);

free(cmd_line);
}

void
Expand Down

0 comments on commit 6c79eb7

Please sign in to comment.