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

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

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

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

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

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

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

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

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

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

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

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

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

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

libavutil/mem.c:119:1: start of procedure av_realloc()
  117. }
  118. 
  119. void *av_realloc(void *ptr, size_t 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:137:5: 
  135.     return _aligned_realloc(ptr, size, 32);
  136. #else
  137.     return realloc(ptr, size);
           ^
  138. #endif
  139. }

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

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

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

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

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

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

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

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

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

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