pnmenc: Fix string memory leak

header being allocated is not freed resulting in leak

https://bugzilla.gnome.org/show_bug.cgi?id=759520
This commit is contained in:
Vineeth TM 2015-12-16 09:05:42 +09:00 committed by Sebastian Dröge
parent 1b2a9a9c84
commit 6cb6903f82

View file

@ -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;
}