diff options
Diffstat (limited to 'src/prog.c')
-rw-r--r-- | src/prog.c | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -9,7 +9,6 @@ #include <lib/dir.h> #include <lib/file.h> #include <lib/lib.h> -#include <lib/mem/galloc.h> #include <lib/monad.h> #include <lib/png.h> #include <lib/seg/mask_data.h> @@ -98,7 +97,7 @@ int main(int arg_count, char **arg_value) { char *fname = file_list[index]; if (is_tif_ext(fname) == FALSE) { fprintf(stderr, "Allocation error?\n"); - g_free(file_list[index]); + free(file_list[index]); continue; } // If we have a tiff file @@ -109,7 +108,7 @@ int main(int arg_count, char **arg_value) { char *fpath = full_path(process_directory, fname); if (fpath == NULL) { fprintf(stderr, "Allocation error?\n"); - g_free(file_list[index]); + free(file_list[index]); continue; } if (!suppress_outputs_b) { @@ -121,8 +120,8 @@ 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]); + free(fpath); + free(file_list[index]); continue; } //----------------------------------------------- @@ -130,10 +129,10 @@ int main(int arg_count, char **arg_value) { //----------------------------------------------- masks_im = combine_masks(masks_im, file_im); free_image_mask(file_im); - g_free(fpath); - g_free(file_list[index]); + free(fpath); + free(file_list[index]); } - g_free(file_list); + free(file_list); } } } @@ -209,8 +208,8 @@ 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); + free(bitmap->image_buffer); + free(bitmap); } write_array(bin_output_file_fullpath, masks_im->image[0], width * height * sizeof(MaskData_t)); @@ -220,6 +219,5 @@ int main(int arg_count, char **arg_value) { if (!suppress_outputs_b) { printf("Finished in %f ms\n", 1000 * diff_time(&ts_g_end, &ts_g_start)); } - printf("Outstanding allocations: %zu\n", g_outstanding_allocations()); return 0; } |