Skip to content

Commit

Permalink
Fix memory leaks caused by formatStatContent
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthäus Wininger committed Nov 12, 2023
1 parent 503a110 commit c11d771
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zps.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,10 @@ static int formatStatContent(char *statContent) {
}
/* Update the original file content and deallocate the memory. */
strcpy(statContent, contentDup);
free(contentDup);
}
free(contentDup);
}
regfree(&regex);
return EXIT_SUCCESS;
}

Expand Down

0 comments on commit c11d771

Please sign in to comment.