diff options
| author | Clement Sibille <clements+git@lisible.xyz> | 2024-03-05 17:05:07 +0900 |
|---|---|---|
| committer | Clement Sibille <clements+git@lisible.xyz> | 2024-03-05 17:05:07 +0900 |
| commit | b2ef28a65d5987d28c9af591308df476353d86f6 (patch) | |
| tree | 346a43c178e5abc95af98bc2079cd333e3c38394 /lisiblepng/src/lisiblepng.c | |
| parent | 1f412b64ce2229a7dc62b57239738c7a09b1af56 (diff) | |
Free the data buffer on Png destruction
Diffstat (limited to 'lisiblepng/src/lisiblepng.c')
| -rw-r--r-- | lisiblepng/src/lisiblepng.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisiblepng/src/lisiblepng.c b/lisiblepng/src/lisiblepng.c index 21940b2..5fecb52 100644 --- a/lisiblepng/src/lisiblepng.c +++ b/lisiblepng/src/lisiblepng.c @@ -511,7 +511,10 @@ err: } #undef PARSE_FIELD -void lis_Png_destroy(Png *png) { free(png); } +void lis_Png_destroy(Png *png) { + free(png->data); + free(png); +} void lis_Png_dump_ppm(const Png *png) { ASSERT(png != NULL); printf("P3\n"); |
