summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorVineeth TM <vineeth.tm@samsung.com>2015-12-16 09:05:42 +0900
committerSebastian Dröge <sebastian@centricular.com>2015-12-16 09:42:42 +0100
commit6cb6903f82316aa4b00d00001a918e9949d9fd4e (patch)
tree41ca9c86c905372e1219783f72574bebdbfdbf9e /gst
parent1b2a9a9c844904840aac31e9451840b5f5c0cf80 (diff)
downloadgstreamer-plugins-bad-6cb6903f82316aa4b00d00001a918e9949d9fd4e.tar.gz
pnmenc: Fix string memory leak
header being allocated is not freed resulting in leak https://bugzilla.gnome.org/show_bug.cgi?id=759520
Diffstat (limited to 'gst')
-rw-r--r--gst/pnm/gstpnmenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/pnm/gstpnmenc.c b/gst/pnm/gstpnmenc.c
index 6352cc241..d88627359 100644
--- a/gst/pnm/gstpnmenc.c
+++ b/gst/pnm/gstpnmenc.c
@@ -174,7 +174,7 @@ gst_pnmenc_handle_frame (GstVideoEncoder * encoder, GstVideoCodecFrame * frame)
GstPnmenc *pnmenc;
guint size, pixels;
GstMapInfo omap, imap;
- gchar *header;
+ gchar *header = NULL;
GstVideoInfo *info;
GstFlowReturn ret = GST_FLOW_OK;
guint i_rowstride, o_rowstride;
@@ -284,6 +284,7 @@ gst_pnmenc_handle_frame (GstVideoEncoder * encoder, GstVideoCodecFrame * frame)
goto done;
done:
+ g_free (header);
return ret;
}