[gnome-photos/wip/rishi/use-g-auto-00: 5/7] operation-png-guess-sizes: Use g_auto*
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/use-g-auto-00: 5/7] operation-png-guess-sizes: Use g_auto*
- Date: Sat, 27 Mar 2021 16:29:45 +0000 (UTC)
commit 1c48ef10caebfadab493eede6cd0ce2a67972d99
Author: Debarshi Ray <debarshir gnome org>
Date: Sat Mar 27 15:16:56 2021 +0100
operation-png-guess-sizes: Use g_auto*
https://gitlab.gnome.org/GNOME/gnome-photos/issues/77
src/photos-operation-png-guess-sizes.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/photos-operation-png-guess-sizes.c b/src/photos-operation-png-guess-sizes.c
index 7e0818fb..0ae0fe9f 100644
--- a/src/photos-operation-png-guess-sizes.c
+++ b/src/photos-operation-png-guess-sizes.c
@@ -71,7 +71,7 @@ photos_operation_png_guess_sizes_count (GeglBuffer *buffer,
const Babl *format_buffer;
gsize ret_val = 0;
gsize size;
- guchar *pixels = NULL;
+ g_autofree guchar *pixels = NULL;
png_infop info_ptr = NULL;
png_structp png_ptr = NULL;
@@ -182,7 +182,6 @@ photos_operation_png_guess_sizes_count (GeglBuffer *buffer,
ret_val = size;
out:
- g_free (pixels);
png_destroy_write_struct (&png_ptr, &info_ptr);
return ret_val;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]