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

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

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

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

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

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

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

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

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

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

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

libavformat/matroskadec.c:882:5: Switch condition is true. Entering switch case
880.         break;
881. #ifdef CONFIG_ZLIB
882.     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
         ^
883.         z_stream zstream = {0};
884.         if (inflateInit(&zstream) != Z_OK)

libavformat/matroskadec.c:883:9: 
881. #ifdef CONFIG_ZLIB
882.     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
883.         z_stream zstream = {0};
             ^
884.         if (inflateInit(&zstream) != Z_OK)
885.             return -1;

libavformat/matroskadec.c:884:13: Taking false branch
882.     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
883.         z_stream zstream = {0};
884.         if (inflateInit(&zstream) != Z_OK)
                 ^
885.             return -1;
886.         zstream.next_in = data;

libavformat/matroskadec.c:886:9: 
884.         if (inflateInit(&zstream) != Z_OK)
885.             return -1;
886.         zstream.next_in = data;
             ^
887.         zstream.avail_in = isize;
888.         do {

libavformat/matroskadec.c:887:9: 
885.             return -1;
886.         zstream.next_in = data;
887.         zstream.avail_in = isize;
             ^
888.         do {
889.             pkt_size *= 3;

libavformat/matroskadec.c:889:13: 
887.         zstream.avail_in = isize;
888.         do {
889.             pkt_size *= 3;
                 ^
890.             pkt_data = av_realloc(pkt_data, pkt_size);
891.             zstream.avail_out = pkt_size - zstream.total_out;

libavformat/matroskadec.c:890:13: 
888.         do {
889.             pkt_size *= 3;
890.             pkt_data = av_realloc(pkt_data, pkt_size);
                 ^
891.             zstream.avail_out = pkt_size - zstream.total_out;
892.             zstream.next_out = pkt_data + zstream.total_out;

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:891:13: 
889.             pkt_size *= 3;
890.             pkt_data = av_realloc(pkt_data, pkt_size);
891.             zstream.avail_out = pkt_size - zstream.total_out;
                 ^
892.             zstream.next_out = pkt_data + zstream.total_out;
893.             result = inflate(&zstream, Z_NO_FLUSH);

libavformat/matroskadec.c:892:13: 
890.             pkt_data = av_realloc(pkt_data, pkt_size);
891.             zstream.avail_out = pkt_size - zstream.total_out;
892.             zstream.next_out = pkt_data + zstream.total_out;
                 ^
893.             result = inflate(&zstream, Z_NO_FLUSH);
894.         } while (result==Z_OK && pkt_size<10000000);

libavformat/matroskadec.c:893:13: Skipping inflate(): method has no implementation
891.             zstream.avail_out = pkt_size - zstream.total_out;
892.             zstream.next_out = pkt_data + zstream.total_out;
893.             result = inflate(&zstream, Z_NO_FLUSH);
                 ^
894.         } while (result==Z_OK && pkt_size<10000000);
895.         pkt_size = zstream.total_out;

libavformat/matroskadec.c:894:18: Loop condition is true. Entering loop body
892.             zstream.next_out = pkt_data + zstream.total_out;
893.             result = inflate(&zstream, Z_NO_FLUSH);
894.         } while (result==Z_OK && pkt_size<10000000);
                      ^
895.         pkt_size = zstream.total_out;
896.         inflateEnd(&zstream);

libavformat/matroskadec.c:894:34: Loop condition is true. Entering loop body
892.             zstream.next_out = pkt_data + zstream.total_out;
893.             result = inflate(&zstream, Z_NO_FLUSH);
894.         } while (result==Z_OK && pkt_size<10000000);
                                      ^
895.         pkt_size = zstream.total_out;
896.         inflateEnd(&zstream);

libavformat/matroskadec.c:889:13: 
887.         zstream.avail_in = isize;
888.         do {
889.             pkt_size *= 3;
                 ^
890.             pkt_data = av_realloc(pkt_data, pkt_size);
891.             zstream.avail_out = pkt_size - zstream.total_out;

libavformat/matroskadec.c:890:13: 
888.         do {
889.             pkt_size *= 3;
890.             pkt_data = av_realloc(pkt_data, pkt_size);
                 ^
891.             zstream.avail_out = pkt_size - zstream.total_out;
892.             zstream.next_out = pkt_data + zstream.total_out;

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)
