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

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

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

libavformat/matroskaenc.c:358:5: 
356.     mkv_cuepoint *entries = cues->entries;
357. 
358.     entries = av_realloc(entries, (cues->num_entries + 1) * sizeof(mkv_cuepoint));
         ^
359.     if (entries == NULL)
360.         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:359:9: Taking false branch
357. 
358.     entries = av_realloc(entries, (cues->num_entries + 1) * sizeof(mkv_cuepoint));
359.     if (entries == NULL)
             ^
360.         return AVERROR(ENOMEM);
361. 

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

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