From ff98e6c374192dd655d1db60ffde02cf1f292106 Mon Sep 17 00:00:00 2001 From: Yusuke Nakamura Date: Sun, 26 Oct 2014 11:43:15 +0900 Subject: [PATCH] summary: Evaluate return value of lsmash_add_entry() properly. --- core/summary.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/summary.c b/core/summary.c index d48349b..23e443f 100644 --- a/core/summary.c +++ b/core/summary.c @@ -75,7 +75,7 @@ int lsmash_setup_AudioSpecificConfig( lsmash_audio_summary_t *summary ) specific->size = new_length; specific->data.unstructured = lsmash_memdup( new_asc, new_length ); if( !specific->data.unstructured - || lsmash_add_entry( &summary->opaque->list, specific ) ) + || lsmash_add_entry( &summary->opaque->list, specific ) < 0 ) { lsmash_free( new_asc ); lsmash_destroy_codec_specific_data( specific ); @@ -138,7 +138,7 @@ int lsmash_add_codec_specific_data( lsmash_summary_t *summary, lsmash_codec_spec lsmash_codec_specific_t *dup = isom_duplicate_codec_specific_data( specific ); if( !dup ) return -1; - if( lsmash_add_entry( &summary->opaque->list, dup ) ) + if( lsmash_add_entry( &summary->opaque->list, dup ) < 0 ) { lsmash_destroy_codec_specific_data( dup ); return -1; -- 2.11.4.GIT