diff --git a/subprojects/gst-libav/ext/libav/gstavprotocol.c b/subprojects/gst-libav/ext/libav/gstavprotocol.c index 2fa1bce953..66b43b1873 100644 --- a/subprojects/gst-libav/ext/libav/gstavprotocol.c +++ b/subprojects/gst-libav/ext/libav/gstavprotocol.c @@ -332,10 +332,17 @@ int gst_ffmpeg_pipe_close (AVIOContext * h) { GST_LOG ("Closing pipe"); + GstProtocolInfo *info; if (h == NULL) return 0; + info = (GstProtocolInfo *) h->opaque; + if (info == NULL) + return 0; + + g_free (info); + h->opaque = NULL; av_freep (&h->buffer); av_free (h);