summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwangkun <wangkun611@gmail.com>2013-08-06 11:28:47 +0800
committerGrigori Goronzy <greg@chown.ath.cx>2013-09-24 14:19:53 +0200
commit7a2596b0e3a644f927046774dd748d5ff8e1b0c6 (patch)
tree5d84ecddc82d99951a17d006e251c42c9cd97d72
parenta1e725dd53024f745a4904046330ff7f7130a0fa (diff)
downloadlibass-7a2596b0e3a644f927046774dd748d5ff8e1b0c6.tar.bz2
libass-7a2596b0e3a644f927046774dd748d5ff8e1b0c6.tar.xz
enca: fix memory leak
-rw-r--r--libass/ass.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libass/ass.c b/libass/ass.c
index ad37606..f6fabdc 100644
--- a/libass/ass.c
+++ b/libass/ass.c
@@ -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
}
{