riff-media: fix memory leak after usage for g_strjoin

This leak is observed with valgrind.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2129>
This commit is contained in:
hoonhee.lee 2022-04-07 10:08:37 +09:00 committed by GStreamer Marge Bot
parent d4f9676c9c
commit 27b945aa03

View file

@ -1755,8 +1755,10 @@ gst_riff_create_audio_caps (guint16 codec_id,
GST_DEBUG ("WAVE_FORMAT_EXTENSIBLE audio");
if (caps) {
if (codec_name) {
gchar *tmp = *codec_name;
GST_DEBUG ("WAVE_FORMAT_EXTENSIBLE %s", *codec_name);
*codec_name = g_strjoin ("wavext ", *codec_name, NULL);
*codec_name = g_strjoin ("wavext ", tmp, NULL);
g_free (tmp);
}
return caps;
}