ulpfecenc: fix unmatched free() call
authorMatthew Waters <matthew@centricular.com>
Mon, 21 Feb 2022 02:24:07 +0000 (13:24 +1100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 21 Feb 2022 09:43:33 +0000 (09:43 +0000)
One must always match a g_slice_new with a g_slice_free and a g_new with
a g_free.  This was not the case for the internal ctx struct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1761>

subprojects/gst-plugins-good/gst/rtp/gstrtpulpfecenc.c

index 845351a..5928ba9 100644 (file)
@@ -508,7 +508,7 @@ gst_rtp_ulpfec_enc_stream_ctx_free (GstRtpUlpFecEncStreamCtx * ctx)
   g_assert (0 == ctx->info_arr->len);
   g_array_free (ctx->info_arr, TRUE);
   g_array_free (ctx->scratch_buf, TRUE);
-  g_slice_free1 (sizeof (GstRtpUlpFecEncStreamCtx), ctx);
+  g_free (ctx);
 }
 
 static GstFlowReturn