Fix svace defect 49/75849/2 accepted/tizen/common/20160622.145826 accepted/tizen/ivi/20160622.094120 accepted/tizen/mobile/20160622.094031 accepted/tizen/tv/20160622.094048 accepted/tizen/wearable/20160622.094109 submit/tizen/20160622.011011
authorMinje Ahn <minje.ahn@samsung.com>
Wed, 22 Jun 2016 01:03:04 +0000 (10:03 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Wed, 22 Jun 2016 01:07:33 +0000 (10:07 +0900)
Change-Id: I6bb25184199358f2d32f8feae7504f01f61194a9
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
formats/ffmpeg/mm_file_format_mmf.c

index b2176e4..459f1cb 100755 (executable)
@@ -2731,6 +2731,12 @@ mmf_file_mmf_get_duration(char *src, int is_xmf)
 
        /*alloc work buffer*/
        buf = mmfile_malloc(src_size + 1);
+       if (!buf) {
+               debug_error("failed to memory allocaion.\n");
+               ret_msec = -1;
+               goto _RELEASE_RESOURCE;
+       }
+
 
        /*read data*/
        if ((readed = mmfile_read(fp, buf, src_size)) <= 0) {