diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2019-05-13 22:52:23 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2019-05-13 23:26:02 +0200 |
| commit | fe6fd3cec07429982946dddbc168d8c195c9b4b8 (patch) | |
| tree | 280897bbad0e7d9dbd8ccc779839c4fd01b30cf1 /src/generators.c | |
| parent | 0c3b218886342e44275b087c41faf3b6a2b7f664 (diff) | |
| download | cataract-fe6fd3cec07429982946dddbc168d8c195c9b4b8.tar.xz | |
Plug some memory leaks
Diffstat (limited to 'src/generators.c')
| -rw-r--r-- | src/generators.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/generators.c b/src/generators.c index 6c65227..5d5ba32 100644 --- a/src/generators.c +++ b/src/generators.c @@ -502,6 +502,7 @@ generate_image_for_size (TGallerySetup *setup, if (! img_ref_dst) { g_free (img_src); g_free (img_dst); + exif_data_free (exif_data); return res; } ref_img_w = ref_img_h = 0; @@ -510,6 +511,7 @@ generate_image_for_size (TGallerySetup *setup, if (ref_img_w <= 0 || ref_img_h <= 0) { g_free (img_src); g_free (img_dst); + exif_data_free (exif_data); return res; } /* Browsers need exactly n-factor of the original size */ @@ -519,6 +521,7 @@ generate_image_for_size (TGallerySetup *setup, /* g_print (" Warning: source image %s (%lux%lu) is not large enough for the \"%s\" image size (need %lux%lu)\n", img_src, src_img_w, src_img_h, image_size->name, img_w, img_h); */ g_free (img_src); g_free (img_dst); + exif_data_free (exif_data); return res; } if (setup->warn_resize && (img_w > src_img_w || img_h > src_img_h)) @@ -555,6 +558,7 @@ generate_image_for_size (TGallerySetup *setup, /* printf (" Warning: source image %s (%lux%lu) is not large enough for the \"%s\" image size (need %lux%lu)\n", img_src, src_img_w, src_img_h, image_size->name, tmpw, tmph); */ g_free (img_src); g_free (img_dst); + exif_data_free (exif_data); return res; } /* Calculate dimensions */ |
