summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-image.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-07-03 11:43:42 +0100
committerRichard Hughes <richard@hughsie.com>2014-07-03 11:43:58 +0100
commitc762dea779666c6477548bb818e3f7df35d8dec5 (patch)
treee8de602906b89b0f7b9b79a38b570fe03d793811 /libappstream-glib/as-image.c
parent4693eb600cd57c7d7146e73021ea8decca2e3f17 (diff)
downloadappstream-glib-c762dea779666c6477548bb818e3f7df35d8dec5.tar.gz
trivial: Do not leak memory if the screenshot is small
Diffstat (limited to 'libappstream-glib/as-image.c')
-rw-r--r--libappstream-glib/as-image.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libappstream-glib/as-image.c b/libappstream-glib/as-image.c
index b810d64..b714fbf 100644
--- a/libappstream-glib/as-image.c
+++ b/libappstream-glib/as-image.c
@@ -532,6 +532,7 @@ as_image_save_pixbuf (AsImage *image,
pixbuf,
(width - pixbuf_width) / 2,
(height - pixbuf_height) / 2);
+ return pixbuf;
}
/* is the aspect ratio of the source perfectly 16:9 */