]> granicus.if.org Git - libass/commitdiff
enca: fix memory leak
authorwangkun <wangkun611@gmail.com>
Tue, 6 Aug 2013 03:28:47 +0000 (11:28 +0800)
committerGrigori Goronzy <greg@chown.ath.cx>
Tue, 24 Sep 2013 12:19:53 +0000 (14:19 +0200)
libass/ass.c

index ad376061f1debff07593db203f45b78e4fa3d17b..f6fabdcb6b380a289d17f42400006d8ebba5ad05 100644 (file)
@@ -968,6 +968,11 @@ static char *sub_recode(ASS_Library *library, char *data, size_t size,
             ass_msg(library, MSGL_V, "Opened iconv descriptor");
         } else
             ass_msg(library, MSGL_ERR, "Error opening iconv descriptor");
+#ifdef CONFIG_ENCA
+        if (cp_tmp != codepage) {
+            free((void*)cp_tmp);
+        }
+#endif
     }
 
     {