libavformat/matroskadec.c:874: error: Memory Leak
  memory dynamically allocated by call to `av_realloc()` at line 874, column 24 is not reachable after line 874, column 13.

libavformat/matroskadec.c:857:1: start of procedure matroska_decode_buffer()
855. }
856. 
857. static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
     ^
858.                                   MatroskaTrack *track)
859. {

libavformat/matroskadec.c:860:5: 
858.                                   MatroskaTrack *track)
859. {
860.     MatroskaTrackEncoding *encodings = track->encodings.elem;
         ^
861.     uint8_t* data = *buf;
862.     int isize = *buf_size;

libavformat/matroskadec.c:861:5: 
859. {
860.     MatroskaTrackEncoding *encodings = track->encodings.elem;
861.     uint8_t* data = *buf;
         ^
862.     int isize = *buf_size;
863.     uint8_t* pkt_data = NULL;

libavformat/matroskadec.c:862:5: 
860.     MatroskaTrackEncoding *encodings = track->encodings.elem;
861.     uint8_t* data = *buf;
862.     int isize = *buf_size;
         ^
863.     uint8_t* pkt_data = NULL;
864.     int pkt_size = isize;

libavformat/matroskadec.c:863:5: 
861.     uint8_t* data = *buf;
862.     int isize = *buf_size;
863.     uint8_t* pkt_data = NULL;
         ^
864.     int pkt_size = isize;
865.     int result = 0;

libavformat/matroskadec.c:864:5: 
862.     int isize = *buf_size;
863.     uint8_t* pkt_data = NULL;
864.     int pkt_size = isize;
         ^
865.     int result = 0;
866.     int olen;

libavformat/matroskadec.c:865:5: 
863.     uint8_t* pkt_data = NULL;
864.     int pkt_size = isize;
865.     int result = 0;
         ^
866.     int olen;
867. 

libavformat/matroskadec.c:868:5: 
866.     int olen;
867. 
868.     switch (encodings[0].compression.algo) {
         ^
869.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
870.         return encodings[0].compression.settings.size;

libavformat/matroskadec.c:869:5: Switch condition is false. Skipping switch case
867. 
868.     switch (encodings[0].compression.algo) {
869.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
         ^
870.         return encodings[0].compression.settings.size;
871.     case MATROSKA_TRACK_ENCODING_COMP_LZO:

libavformat/matroskadec.c:871:5: Switch condition is true. Entering switch case
869.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
870.         return encodings[0].compression.settings.size;
871.     case MATROSKA_TRACK_ENCODING_COMP_LZO:
         ^
872.         do {
873.             olen = pkt_size *= 3;

libavformat/matroskadec.c:873:13: 
871.     case MATROSKA_TRACK_ENCODING_COMP_LZO:
872.         do {
873.             olen = pkt_size *= 3;
                 ^
874.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
875.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);

libavformat/matroskadec.c:874:13: 
872.         do {
873.             olen = pkt_size *= 3;
874.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
                 ^
875.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
876.         } while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);

libavutil/mem.c:101:1: start of procedure av_realloc()
   99. }
  100. 
  101. void *av_realloc(void *ptr, unsigned int size)
       ^
  102. {
  103. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:108:8: Taking false branch
  106. 
  107.     /* let's disallow possible ambiguous cases */
  108.     if(size > (INT_MAX-16) )
              ^
  109.         return NULL;
  110. 

libavutil/mem.c:117:5: 
  115.     return (char*)realloc((char*)ptr - diff, size + diff) + diff;
  116. #else
  117.     return realloc(ptr, size);
           ^
  118. #endif
  119. }

libavutil/mem.c:119:1: return from a call to av_realloc
  117.     return realloc(ptr, size);
  118. #endif
  119. }
       ^
  120. 
  121. void av_free(void *ptr)

libavformat/matroskadec.c:875:13: Skipping av_lzo1x_decode(): empty list of specs
873.             olen = pkt_size *= 3;
874.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
875.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
                 ^
876.         } while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);
877.         if (result)

libavformat/matroskadec.c:876:18: Loop condition is true. Entering loop body
874.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
875.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
876.         } while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);
                      ^
877.         if (result)
878.             goto failed;

libavformat/matroskadec.c:876:48: Loop condition is true. Entering loop body
874.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
875.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
876.         } while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);
                                                    ^
877.         if (result)
878.             goto failed;

libavformat/matroskadec.c:873:13: 
871.     case MATROSKA_TRACK_ENCODING_COMP_LZO:
872.         do {
873.             olen = pkt_size *= 3;
                 ^
874.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
875.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);

libavformat/matroskadec.c:874:13: 
872.         do {
873.             olen = pkt_size *= 3;
874.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
                 ^
875.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
876.         } while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);

libavutil/mem.c:101:1: start of procedure av_realloc()
   99. }
  100. 
  101. void *av_realloc(void *ptr, unsigned int size)
       ^
  102. {
  103. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:108:8: Taking true branch
  106. 
  107.     /* let's disallow possible ambiguous cases */
  108.     if(size > (INT_MAX-16) )
              ^
  109.         return NULL;
  110. 

libavutil/mem.c:109:9: 
  107.     /* let's disallow possible ambiguous cases */
  108.     if(size > (INT_MAX-16) )
  109.         return NULL;
               ^
  110. 
  111. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:119:1: return from a call to av_realloc
  117.     return realloc(ptr, size);
  118. #endif
  119. }
       ^
  120. 
  121. void av_free(void *ptr)
