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

libavformat/matroskadec.c:869:1: start of procedure matroska_decode_buffer()
867. }
868. 
869. static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
     ^
870.                                   MatroskaTrack *track)
871. {

libavformat/matroskadec.c:872:5: 
870.                                   MatroskaTrack *track)
871. {
872.     MatroskaTrackEncoding *encodings = track->encodings.elem;
         ^
873.     uint8_t* data = *buf;
874.     int isize = *buf_size;

libavformat/matroskadec.c:873:5: 
871. {
872.     MatroskaTrackEncoding *encodings = track->encodings.elem;
873.     uint8_t* data = *buf;
         ^
874.     int isize = *buf_size;
875.     uint8_t* pkt_data = NULL;

libavformat/matroskadec.c:874:5: 
872.     MatroskaTrackEncoding *encodings = track->encodings.elem;
873.     uint8_t* data = *buf;
874.     int isize = *buf_size;
         ^
875.     uint8_t* pkt_data = NULL;
876.     int pkt_size = isize;

libavformat/matroskadec.c:875:5: 
873.     uint8_t* data = *buf;
874.     int isize = *buf_size;
875.     uint8_t* pkt_data = NULL;
         ^
876.     int pkt_size = isize;
877.     int result = 0;

libavformat/matroskadec.c:876:5: 
874.     int isize = *buf_size;
875.     uint8_t* pkt_data = NULL;
876.     int pkt_size = isize;
         ^
877.     int result = 0;
878.     int olen;

libavformat/matroskadec.c:877:5: 
875.     uint8_t* pkt_data = NULL;
876.     int pkt_size = isize;
877.     int result = 0;
         ^
878.     int olen;
879. 

libavformat/matroskadec.c:880:5: 
878.     int olen;
879. 
880.     switch (encodings[0].compression.algo) {
         ^
881.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
882.         return encodings[0].compression.settings.size;

libavformat/matroskadec.c:881:5: Switch condition is false. Skipping switch case
879. 
880.     switch (encodings[0].compression.algo) {
881.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
         ^
882.         return encodings[0].compression.settings.size;
883.     case MATROSKA_TRACK_ENCODING_COMP_LZO:

libavformat/matroskadec.c:883:5: Switch condition is false. Skipping switch case
881.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
882.         return encodings[0].compression.settings.size;
883.     case MATROSKA_TRACK_ENCODING_COMP_LZO:
         ^
884.         do {
885.             olen = pkt_size *= 3;

libavformat/matroskadec.c:894:5: Switch condition is true. Entering switch case
892.         break;
893. #if CONFIG_ZLIB
894.     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
         ^
895.         z_stream zstream = {0};
896.         if (inflateInit(&zstream) != Z_OK)

libavformat/matroskadec.c:895:9: 
893. #if CONFIG_ZLIB
894.     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
895.         z_stream zstream = {0};
             ^
896.         if (inflateInit(&zstream) != Z_OK)
897.             return -1;

libavformat/matroskadec.c:896:13: Taking false branch
894.     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
895.         z_stream zstream = {0};
896.         if (inflateInit(&zstream) != Z_OK)
                 ^
897.             return -1;
898.         zstream.next_in = data;

libavformat/matroskadec.c:898:9: 
896.         if (inflateInit(&zstream) != Z_OK)
897.             return -1;
898.         zstream.next_in = data;
             ^
899.         zstream.avail_in = isize;
900.         do {

libavformat/matroskadec.c:899:9: 
897.             return -1;
898.         zstream.next_in = data;
899.         zstream.avail_in = isize;
             ^
900.         do {
901.             pkt_size *= 3;

libavformat/matroskadec.c:901:13: 
899.         zstream.avail_in = isize;
900.         do {
901.             pkt_size *= 3;
                 ^
902.             pkt_data = av_realloc(pkt_data, pkt_size);
903.             zstream.avail_out = pkt_size - zstream.total_out;

libavformat/matroskadec.c:902:13: 
900.         do {
901.             pkt_size *= 3;
902.             pkt_data = av_realloc(pkt_data, pkt_size);
                 ^
903.             zstream.avail_out = pkt_size - zstream.total_out;
904.             zstream.next_out = pkt_data + zstream.total_out;

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

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

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

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

libavformat/matroskadec.c:903:13: 
901.             pkt_size *= 3;
902.             pkt_data = av_realloc(pkt_data, pkt_size);
903.             zstream.avail_out = pkt_size - zstream.total_out;
                 ^
904.             zstream.next_out = pkt_data + zstream.total_out;
905.             result = inflate(&zstream, Z_NO_FLUSH);

libavformat/matroskadec.c:904:13: 
902.             pkt_data = av_realloc(pkt_data, pkt_size);
903.             zstream.avail_out = pkt_size - zstream.total_out;
904.             zstream.next_out = pkt_data + zstream.total_out;
                 ^
905.             result = inflate(&zstream, Z_NO_FLUSH);
906.         } while (result==Z_OK && pkt_size<10000000);

libavformat/matroskadec.c:905:13: Skipping inflate(): method has no implementation
903.             zstream.avail_out = pkt_size - zstream.total_out;
904.             zstream.next_out = pkt_data + zstream.total_out;
905.             result = inflate(&zstream, Z_NO_FLUSH);
                 ^
906.         } while (result==Z_OK && pkt_size<10000000);
907.         pkt_size = zstream.total_out;

libavformat/matroskadec.c:906:18: Loop condition is true. Entering loop body
904.             zstream.next_out = pkt_data + zstream.total_out;
905.             result = inflate(&zstream, Z_NO_FLUSH);
906.         } while (result==Z_OK && pkt_size<10000000);
                      ^
907.         pkt_size = zstream.total_out;
908.         inflateEnd(&zstream);

libavformat/matroskadec.c:906:34: Loop condition is true. Entering loop body
904.             zstream.next_out = pkt_data + zstream.total_out;
905.             result = inflate(&zstream, Z_NO_FLUSH);
906.         } while (result==Z_OK && pkt_size<10000000);
                                      ^
907.         pkt_size = zstream.total_out;
908.         inflateEnd(&zstream);

libavformat/matroskadec.c:901:13: 
899.         zstream.avail_in = isize;
900.         do {
901.             pkt_size *= 3;
                 ^
902.             pkt_data = av_realloc(pkt_data, pkt_size);
903.             zstream.avail_out = pkt_size - zstream.total_out;

libavformat/matroskadec.c:902:13: 
900.         do {
901.             pkt_size *= 3;
902.             pkt_data = av_realloc(pkt_data, pkt_size);
                 ^
903.             zstream.avail_out = pkt_size - zstream.total_out;
904.             zstream.next_out = pkt_data + zstream.total_out;

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

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

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

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