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

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

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

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

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

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

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

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

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

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

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

libavformat/matroskadec.c:874:13: 
872.     case MATROSKA_TRACK_ENCODING_COMP_LZO:
873.         do {
874.             olen = pkt_size *= 3;
                 ^
875.             pkt_data = av_realloc(pkt_data,
876.                                   pkt_size+LZO_OUTPUT_PADDING);

libavformat/matroskadec.c:875:13: 
873.         do {
874.             olen = pkt_size *= 3;
875.             pkt_data = av_realloc(pkt_data,
                 ^
876.                                   pkt_size+LZO_OUTPUT_PADDING);
877.             result = lzo1x_decode(pkt_data, &olen, data, &isize);

libavutil/mem.c:94:1: start of procedure av_realloc()
  92. }
  93. 
  94. void *av_realloc(void *ptr, unsigned int size)
      ^
  95. {
  96. #ifdef CONFIG_MEMALIGN_HACK

libavutil/mem.c:101:8: Taking false branch
   99. 
  100.     /* let's disallow possible ambiguous cases */
  101.     if(size > (INT_MAX-16) )
              ^
  102.         return NULL;
  103. 

libavutil/mem.c:110:5: 
  108.     return (char*)realloc((char*)ptr - diff, size + diff) + diff;
  109. #else
  110.     return realloc(ptr, size);
           ^
  111. #endif
  112. }

libavutil/mem.c:112:1: return from a call to av_realloc
  110.     return realloc(ptr, size);
  111. #endif
  112. }
       ^
  113. 
  114. void av_free(void *ptr)

libavformat/matroskadec.c:877:13: Skipping lzo1x_decode(): empty list of specs
875.             pkt_data = av_realloc(pkt_data,
876.                                   pkt_size+LZO_OUTPUT_PADDING);
877.             result = lzo1x_decode(pkt_data, &olen, data, &isize);
                 ^
878.         } while (result==LZO_OUTPUT_FULL && pkt_size<10000000);
879.         if (result)

libavformat/matroskadec.c:878:18: Loop condition is true. Entering loop body
876.                                   pkt_size+LZO_OUTPUT_PADDING);
877.             result = lzo1x_decode(pkt_data, &olen, data, &isize);
878.         } while (result==LZO_OUTPUT_FULL && pkt_size<10000000);
                      ^
879.         if (result)
880.             goto failed;

libavformat/matroskadec.c:878:45: Loop condition is true. Entering loop body
876.                                   pkt_size+LZO_OUTPUT_PADDING);
877.             result = lzo1x_decode(pkt_data, &olen, data, &isize);
878.         } while (result==LZO_OUTPUT_FULL && pkt_size<10000000);
                                                 ^
879.         if (result)
880.             goto failed;

libavformat/matroskadec.c:874:13: 
872.     case MATROSKA_TRACK_ENCODING_COMP_LZO:
873.         do {
874.             olen = pkt_size *= 3;
                 ^
875.             pkt_data = av_realloc(pkt_data,
876.                                   pkt_size+LZO_OUTPUT_PADDING);

libavformat/matroskadec.c:875:13: 
873.         do {
874.             olen = pkt_size *= 3;
875.             pkt_data = av_realloc(pkt_data,
                 ^
876.                                   pkt_size+LZO_OUTPUT_PADDING);
877.             result = lzo1x_decode(pkt_data, &olen, data, &isize);

libavutil/mem.c:94:1: start of procedure av_realloc()
  92. }
  93. 
  94. void *av_realloc(void *ptr, unsigned int size)
      ^
  95. {
  96. #ifdef CONFIG_MEMALIGN_HACK

libavutil/mem.c:101:8: Taking true branch
   99. 
  100.     /* let's disallow possible ambiguous cases */
  101.     if(size > (INT_MAX-16) )
              ^
  102.         return NULL;
  103. 

libavutil/mem.c:102:9: 
  100.     /* let's disallow possible ambiguous cases */
  101.     if(size > (INT_MAX-16) )
  102.         return NULL;
               ^
  103. 
  104. #ifdef CONFIG_MEMALIGN_HACK

libavutil/mem.c:112:1: return from a call to av_realloc
  110.     return realloc(ptr, size);
  111. #endif
  112. }
       ^
  113. 
  114. void av_free(void *ptr)
