summaryrefslogtreecommitdiffstats
path: root/libdimension/png.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/png.c')
-rw-r--r--libdimension/png.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libdimension/png.c b/libdimension/png.c
index c5dfeca..189c998 100644
--- a/libdimension/png.c
+++ b/libdimension/png.c
@@ -194,7 +194,7 @@ dmnsn_png_write_canvas_thread(void *ptr)
if (!payload->file) {
/* file was NULL */
errno = EINVAL;
- free(payload);
+ dmnsn_free(payload);
return -1;
}
@@ -207,7 +207,7 @@ dmnsn_png_write_canvas_thread(void *ptr)
= png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (!png_ptr) {
/* Couldn't create libpng write struct */
- free(payload);
+ dmnsn_free(payload);
return -1;
}
@@ -215,7 +215,7 @@ dmnsn_png_write_canvas_thread(void *ptr)
if (!info_ptr) {
/* Couldn't create libpng info struct */
png_destroy_write_struct(&png_ptr, NULL);
- free(payload);
+ dmnsn_free(payload);
return -1;
}
@@ -223,9 +223,9 @@ dmnsn_png_write_canvas_thread(void *ptr)
uint16_t *row = NULL;
if (setjmp(png_jmpbuf(png_ptr))) {
/* libpng error */
- free(row);
+ dmnsn_free(row);
png_destroy_write_struct(&png_ptr, &info_ptr);
- free(payload);
+ dmnsn_free(payload);
return -1;
}
@@ -264,7 +264,7 @@ dmnsn_png_write_canvas_thread(void *ptr)
/* Finish the PNG file */
png_write_end(png_ptr, info_ptr);
png_destroy_write_struct(&png_ptr, &info_ptr);
- free(payload);
+ dmnsn_free(payload);
return 0;
}
}
@@ -323,9 +323,9 @@ dmnsn_png_write_canvas_thread(void *ptr)
/* Finish the PNG file */
png_write_end(png_ptr, info_ptr);
- free(row);
+ dmnsn_free(row);
png_destroy_write_struct(&png_ptr, &info_ptr);
- free(payload);
+ dmnsn_free(payload);
return 0;
}
@@ -409,8 +409,8 @@ dmnsn_png_read_canvas_thread(void *ptr)
png_bytep *row_pointers = NULL;
if (setjmp(png_jmpbuf(png_ptr))) {
/* libpng error */
- free(row_pointers);
- free(image);
+ dmnsn_free(row_pointers);
+ dmnsn_free(image);
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return -1;
}
@@ -559,10 +559,10 @@ dmnsn_png_read_canvas_thread(void *ptr)
}
}
- free(row_pointers);
- free(image);
+ dmnsn_free(row_pointers);
+ dmnsn_free(image);
png_read_end(png_ptr, NULL);
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
- free(payload);
+ dmnsn_free(payload);
return 0;
}