aboutsummaryrefslogtreecommitdiff
path: root/src/prog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/prog.c')
-rw-r--r--src/prog.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/prog.c b/src/prog.c
index e08bb72..6999a32 100644
--- a/src/prog.c
+++ b/src/prog.c
@@ -97,6 +97,7 @@ int main(int arg_count, char **arg_value) {
for (size_t index = 0; file_list[index] != NULL; index++) {
char *fname = file_list[index];
if (is_tif_ext(fname) == FALSE) {
+ fprintf(stderr, "Allocation error?\n");
g_free(file_list[index]);
continue;
}
@@ -107,6 +108,7 @@ int main(int arg_count, char **arg_value) {
// 4. Free up allocations made in this process
char *fpath = full_path(process_directory, fname);
if (fpath == NULL) {
+ fprintf(stderr, "Allocation error?\n");
g_free(file_list[index]);
continue;
}
@@ -118,6 +120,7 @@ int main(int arg_count, char **arg_value) {
//-----------------------------------------------
Mask *file_im = tif_to_labels(fpath, &starting_label);
if (file_im == NULL) {
+ fprintf(stderr, "Allocation error?\n");
g_free(fpath);
g_free(file_list[index]);
continue;
@@ -206,6 +209,7 @@ int main(int arg_count, char **arg_value) {
Bitmap *bitmap = image_mask_data_to_bitmap(masks_im);
if (bitmap != NULL) {
save_png(bitmap, png_output_file_fullpath);
+ g_free(bitmap->image_buffer);
g_free(bitmap);
}
write_array(bin_output_file_fullpath, masks_im->image[0],