summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2018-01-10 16:54:58 +0100
committerDamiano Galassi <[email protected]>2018-01-10 16:54:58 +0100
commitd68902402ea9a8d337716b9d361d29c1a97b004f (patch)
treeb1b728bdac1208307f383ff260384b36aac6f78f
parentf419e5a786c659727f9e5d91b2aed7127b6d71be (diff)
libhb: fix a leak in decssasub
-rw-r--r--libhb/decssasub.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libhb/decssasub.c b/libhb/decssasub.c
index 39d051902..4ad0b1558 100644
--- a/libhb/decssasub.c
+++ b/libhb/decssasub.c
@@ -348,7 +348,10 @@ ssa_decode_line_to_mkv_ssa( hb_work_object_t * w, hb_buffer_t * in,
// when there is no layer field.
numPartsRead = sscanf( (char *)in_data, "Dialogue:%128[^,],", layerField );
if ( numPartsRead != 1 )
+ {
+ free(layerField);
goto fail;
+ }
styleToTextFields = (char *)find_field( in_data, in_data + in_size, 4 );
if ( styleToTextFields == NULL ) {