libavformat/matroskaenc.c:365: error: Memory Leak
  memory dynamically allocated to `return` by call to `av_realloc()` at line 360, column 15 is not reachable after line 365, column 9.

libavformat/matroskaenc.c:356:1: start of procedure mkv_add_cuepoint()
354. }
355. 
356. static int mkv_add_cuepoint(mkv_cues *cues, int stream, int64_t ts, int64_t cluster_pos)
     ^
357. {
358.     mkv_cuepoint *entries = cues->entries;

libavformat/matroskaenc.c:358:5: 
356. static int mkv_add_cuepoint(mkv_cues *cues, int stream, int64_t ts, int64_t cluster_pos)
357. {
358.     mkv_cuepoint *entries = cues->entries;
         ^
359. 
360.     entries = av_realloc(entries, (cues->num_entries + 1) * sizeof(mkv_cuepoint));

libavformat/matroskaenc.c:360:5: 
358.     mkv_cuepoint *entries = cues->entries;
359. 
360.     entries = av_realloc(entries, (cues->num_entries + 1) * sizeof(mkv_cuepoint));
         ^
361.     if (entries == NULL)
362.         return AVERROR(ENOMEM);

libavutil/mem.c:119:1: start of procedure av_realloc()
  117. }
  118. 
  119. void *av_realloc(void *ptr, unsigned int size)
       ^
  120. {
  121. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:126:8: Taking false branch
  124. 
  125.     /* let's disallow possible ambiguous cases */
  126.     if(size > (INT_MAX-16) )
              ^
  127.         return NULL;
  128. 

libavutil/mem.c:135:5: 
  133.     return (char*)realloc((char*)ptr - diff, size + diff) + diff;
  134. #else
  135.     return realloc(ptr, size);
           ^
  136. #endif
  137. }

libavutil/mem.c:137:1: return from a call to av_realloc
  135.     return realloc(ptr, size);
  136. #endif
  137. }
       ^
  138. 
  139. void av_free(void *ptr)

libavformat/matroskaenc.c:361:9: Taking false branch
359. 
360.     entries = av_realloc(entries, (cues->num_entries + 1) * sizeof(mkv_cuepoint));
361.     if (entries == NULL)
             ^
362.         return AVERROR(ENOMEM);
363. 

libavformat/matroskaenc.c:364:9: Taking true branch
362.         return AVERROR(ENOMEM);
363. 
364.     if (ts < 0)
             ^
365.         return 0;
366. 

libavformat/matroskaenc.c:365:9: 
363. 
364.     if (ts < 0)
365.         return 0;
             ^
366. 
367.     entries[cues->num_entries  ].pts = ts;
