Fix memory leak in libgsm wrapper.
authorMartin Storsjö <martin@martin.st>
Mon, 10 Nov 2008 20:02:00 +0000 (20:02 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Mon, 10 Nov 2008 20:02:00 +0000 (20:02 +0000)
Patch by Martin Storsjö, martin at martin dot st

Originally committed as revision 15798 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/libgsm.c

index 09578b4..2d7df9b 100644 (file)
@@ -89,6 +89,7 @@ static av_cold int libgsm_init(AVCodecContext *avctx) {
 }
 
 static av_cold int libgsm_close(AVCodecContext *avctx) {
+    av_freep(&avctx->coded_frame);
     gsm_destroy(avctx->priv_data);
     avctx->priv_data = NULL;
     return 0;