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

libavformat/matroskaenc.c:362:1: start of procedure mkv_add_cuepoint()
360. }
361. 
362. static int mkv_add_cuepoint(mkv_cues *cues, int stream, int64_t ts, int64_t cluster_pos)
     ^
363. {
364.     mkv_cuepoint *entries = cues->entries;

libavformat/matroskaenc.c:364:5: 
362. static int mkv_add_cuepoint(mkv_cues *cues, int stream, int64_t ts, int64_t cluster_pos)
363. {
364.     mkv_cuepoint *entries = cues->entries;
         ^
365. 
366.     entries = av_realloc(entries, (cues->num_entries + 1) * sizeof(mkv_cuepoint));

libavformat/matroskaenc.c:366:5: 
364.     mkv_cuepoint *entries = cues->entries;
365. 
366.     entries = av_realloc(entries, (cues->num_entries + 1) * sizeof(mkv_cuepoint));
         ^
367.     if (entries == NULL)
368.         return AVERROR(ENOMEM);

libavutil/mem.c:117:1: start of procedure av_realloc()
  115. }
  116. 
  117. void *av_realloc(void *ptr, size_t size)
       ^
  118. {
  119. #if CONFIG_MEMALIGN_HACK

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

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

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

libavformat/matroskaenc.c:367:9: Taking false branch
365. 
366.     entries = av_realloc(entries, (cues->num_entries + 1) * sizeof(mkv_cuepoint));
367.     if (entries == NULL)
             ^
368.         return AVERROR(ENOMEM);
369. 

libavformat/matroskaenc.c:370:9: Taking true branch
368.         return AVERROR(ENOMEM);
369. 
370.     if (ts < 0)
             ^
371.         return 0;
372. 

libavformat/matroskaenc.c:371:9: 
369. 
370.     if (ts < 0)
371.         return 0;
             ^
372. 
373.     entries[cues->num_entries  ].pts = ts;
