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

libavformat/matroskadec.c:980:1: start of procedure matroska_decode_buffer()
978. }
979. 
980. static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
     ^
981.                                   MatroskaTrack *track)
982. {

libavformat/matroskadec.c:983:5: 
981.                                   MatroskaTrack *track)
982. {
983.     MatroskaTrackEncoding *encodings = track->encodings.elem;
         ^
984.     uint8_t* data = *buf;
985.     int isize = *buf_size;

libavformat/matroskadec.c:984:5: 
982. {
983.     MatroskaTrackEncoding *encodings = track->encodings.elem;
984.     uint8_t* data = *buf;
         ^
985.     int isize = *buf_size;
986.     uint8_t* pkt_data = NULL;

libavformat/matroskadec.c:985:5: 
983.     MatroskaTrackEncoding *encodings = track->encodings.elem;
984.     uint8_t* data = *buf;
985.     int isize = *buf_size;
         ^
986.     uint8_t* pkt_data = NULL;
987.     uint8_t av_unused *newpktdata;

libavformat/matroskadec.c:986:5: 
984.     uint8_t* data = *buf;
985.     int isize = *buf_size;
986.     uint8_t* pkt_data = NULL;
         ^
987.     uint8_t av_unused *newpktdata;
988.     int pkt_size = isize;

libavformat/matroskadec.c:988:5: 
986.     uint8_t* pkt_data = NULL;
987.     uint8_t av_unused *newpktdata;
988.     int pkt_size = isize;
         ^
989.     int result = 0;
990.     int olen;

libavformat/matroskadec.c:989:5: 
987.     uint8_t av_unused *newpktdata;
988.     int pkt_size = isize;
989.     int result = 0;
         ^
990.     int olen;
991. 

libavformat/matroskadec.c:992:9: Taking false branch
990.     int olen;
991. 
992.     if (pkt_size >= 10000000)
             ^
993.         return -1;
994. 

libavformat/matroskadec.c:995:5: 
993.         return -1;
994. 
995.     switch (encodings[0].compression.algo) {
         ^
996.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
997.         return encodings[0].compression.settings.size;

libavformat/matroskadec.c:996:5: Switch condition is false. Skipping switch case
994. 
995.     switch (encodings[0].compression.algo) {
996.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
         ^
997.         return encodings[0].compression.settings.size;
998.     case MATROSKA_TRACK_ENCODING_COMP_LZO:

libavformat/matroskadec.c:998:5: Switch condition is true. Entering switch case
 996.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
 997.         return encodings[0].compression.settings.size;
 998.     case MATROSKA_TRACK_ENCODING_COMP_LZO:
          ^
 999.         do {
1000.             olen = pkt_size *= 3;

libavformat/matroskadec.c:1000:13: 
 998.     case MATROSKA_TRACK_ENCODING_COMP_LZO:
 999.         do {
1000.             olen = pkt_size *= 3;
                  ^
1001.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
1002.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);

libavformat/matroskadec.c:1001:13: 
 999.         do {
1000.             olen = pkt_size *= 3;
1001.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
                  ^
1002.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
1003.         } while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);

libavutil/mem.c:121:1: start of procedure av_realloc()
  119. }
  120. 
  121. void *av_realloc(void *ptr, size_t size)
       ^
  122. {
  123. #if CONFIG_MEMALIGN_HACK

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

libavutil/mem.c:139:5: 
  137.     return _aligned_realloc(ptr, size, 32);
  138. #else
  139.     return realloc(ptr, size);
           ^
  140. #endif
  141. }

libavutil/mem.c:141:1: return from a call to av_realloc
  139.     return realloc(ptr, size);
  140. #endif
  141. }
       ^
  142. 
  143. void av_free(void *ptr)

libavformat/matroskadec.c:1002:13: Skipping av_lzo1x_decode(): empty list of specs
1000.             olen = pkt_size *= 3;
1001.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
1002.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
                  ^
1003.         } while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);
1004.         if (result)

libavformat/matroskadec.c:1003:18: Loop condition is true. Entering loop body
1001.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
1002.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
1003.         } while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);
                       ^
1004.         if (result)
1005.             goto failed;

libavformat/matroskadec.c:1003:48: Loop condition is true. Entering loop body
1001.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
1002.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
1003.         } while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);
                                                     ^
1004.         if (result)
1005.             goto failed;

libavformat/matroskadec.c:1000:13: 
 998.     case MATROSKA_TRACK_ENCODING_COMP_LZO:
 999.         do {
1000.             olen = pkt_size *= 3;
                  ^
1001.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
1002.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);

libavformat/matroskadec.c:1001:13: 
 999.         do {
1000.             olen = pkt_size *= 3;
1001.             pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
                  ^
1002.             result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
1003.         } while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);

libavutil/mem.c:121:1: start of procedure av_realloc()
  119. }
  120. 
  121. void *av_realloc(void *ptr, size_t size)
       ^
  122. {
  123. #if CONFIG_MEMALIGN_HACK

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

libavutil/mem.c:129:9: 
  127.     /* let's disallow possible ambiguous cases */
  128.     if(size > (INT_MAX-16) )
  129.         return NULL;
               ^
  130. 
  131. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:141:1: return from a call to av_realloc
  139.     return realloc(ptr, size);
  140. #endif
  141. }
       ^
  142. 
  143. void av_free(void *ptr)
