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

libavformat/matroskadec.c:925:1: start of procedure matroska_decode_buffer()
923. }
924. 
925. static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
     ^
926.                                   MatroskaTrack *track)
927. {

libavformat/matroskadec.c:928:5: 
926.                                   MatroskaTrack *track)
927. {
928.     MatroskaTrackEncoding *encodings = track->encodings.elem;
         ^
929.     uint8_t* data = *buf;
930.     int isize = *buf_size;

libavformat/matroskadec.c:929:5: 
927. {
928.     MatroskaTrackEncoding *encodings = track->encodings.elem;
929.     uint8_t* data = *buf;
         ^
930.     int isize = *buf_size;
931.     uint8_t* pkt_data = NULL;

libavformat/matroskadec.c:930:5: 
928.     MatroskaTrackEncoding *encodings = track->encodings.elem;
929.     uint8_t* data = *buf;
930.     int isize = *buf_size;
         ^
931.     uint8_t* pkt_data = NULL;
932.     int pkt_size = isize;

libavformat/matroskadec.c:931:5: 
929.     uint8_t* data = *buf;
930.     int isize = *buf_size;
931.     uint8_t* pkt_data = NULL;
         ^
932.     int pkt_size = isize;
933.     int result = 0;

libavformat/matroskadec.c:932:5: 
930.     int isize = *buf_size;
931.     uint8_t* pkt_data = NULL;
932.     int pkt_size = isize;
         ^
933.     int result = 0;
934.     int olen;

libavformat/matroskadec.c:933:5: 
931.     uint8_t* pkt_data = NULL;
932.     int pkt_size = isize;
933.     int result = 0;
         ^
934.     int olen;
935. 

libavformat/matroskadec.c:936:9: Taking false branch
934.     int olen;
935. 
936.     if (pkt_size >= 10000000)
             ^
937.         return -1;
938. 

libavformat/matroskadec.c:939:5: 
937.         return -1;
938. 
939.     switch (encodings[0].compression.algo) {
         ^
940.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
941.         return encodings[0].compression.settings.size;

libavformat/matroskadec.c:940:5: Switch condition is false. Skipping switch case
938. 
939.     switch (encodings[0].compression.algo) {
940.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
         ^
941.         return encodings[0].compression.settings.size;
942.     case MATROSKA_TRACK_ENCODING_COMP_LZO:

libavformat/matroskadec.c:942:5: Switch condition is false. Skipping switch case
940.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
941.         return encodings[0].compression.settings.size;
942.     case MATROSKA_TRACK_ENCODING_COMP_LZO:
         ^
943.         do {
944.             olen = pkt_size *= 3;

libavformat/matroskadec.c:953:5: Switch condition is true. Entering switch case
951.         break;
952. #if CONFIG_ZLIB
953.     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
         ^
954.         z_stream zstream = {0};
955.         if (inflateInit(&zstream) != Z_OK)

libavformat/matroskadec.c:954:9: 
952. #if CONFIG_ZLIB
953.     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
954.         z_stream zstream = {0};
             ^
955.         if (inflateInit(&zstream) != Z_OK)
956.             return -1;

libavformat/matroskadec.c:955:13: Taking false branch
953.     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
954.         z_stream zstream = {0};
955.         if (inflateInit(&zstream) != Z_OK)
                 ^
956.             return -1;
957.         zstream.next_in = data;

libavformat/matroskadec.c:957:9: 
955.         if (inflateInit(&zstream) != Z_OK)
956.             return -1;
957.         zstream.next_in = data;
             ^
958.         zstream.avail_in = isize;
959.         do {

libavformat/matroskadec.c:958:9: 
956.             return -1;
957.         zstream.next_in = data;
958.         zstream.avail_in = isize;
             ^
959.         do {
960.             pkt_size *= 3;

libavformat/matroskadec.c:960:13: 
958.         zstream.avail_in = isize;
959.         do {
960.             pkt_size *= 3;
                 ^
961.             pkt_data = av_realloc(pkt_data, pkt_size);
962.             zstream.avail_out = pkt_size - zstream.total_out;

libavformat/matroskadec.c:961:13: 
959.         do {
960.             pkt_size *= 3;
961.             pkt_data = av_realloc(pkt_data, pkt_size);
                 ^
962.             zstream.avail_out = pkt_size - zstream.total_out;
963.             zstream.next_out = pkt_data + zstream.total_out;

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

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

libavutil/mem.c:133:5: 
  131.     return (char*)realloc((char*)ptr - diff, size + diff) + diff;
  132. #else
  133.     return realloc(ptr, size);
           ^
  134. #endif
  135. }

libavutil/mem.c:135:1: return from a call to av_realloc
  133.     return realloc(ptr, size);
  134. #endif
  135. }
       ^
  136. 
  137. void av_free(void *ptr)

libavformat/matroskadec.c:962:13: 
960.             pkt_size *= 3;
961.             pkt_data = av_realloc(pkt_data, pkt_size);
962.             zstream.avail_out = pkt_size - zstream.total_out;
                 ^
963.             zstream.next_out = pkt_data + zstream.total_out;
964.             result = inflate(&zstream, Z_NO_FLUSH);

libavformat/matroskadec.c:963:13: 
961.             pkt_data = av_realloc(pkt_data, pkt_size);
962.             zstream.avail_out = pkt_size - zstream.total_out;
963.             zstream.next_out = pkt_data + zstream.total_out;
                 ^
964.             result = inflate(&zstream, Z_NO_FLUSH);
965.         } while (result==Z_OK && pkt_size<10000000);

libavformat/matroskadec.c:964:13: Skipping inflate(): method has no implementation
962.             zstream.avail_out = pkt_size - zstream.total_out;
963.             zstream.next_out = pkt_data + zstream.total_out;
964.             result = inflate(&zstream, Z_NO_FLUSH);
                 ^
965.         } while (result==Z_OK && pkt_size<10000000);
966.         pkt_size = zstream.total_out;

libavformat/matroskadec.c:965:18: Loop condition is true. Entering loop body
963.             zstream.next_out = pkt_data + zstream.total_out;
964.             result = inflate(&zstream, Z_NO_FLUSH);
965.         } while (result==Z_OK && pkt_size<10000000);
                      ^
966.         pkt_size = zstream.total_out;
967.         inflateEnd(&zstream);

libavformat/matroskadec.c:965:34: Loop condition is true. Entering loop body
963.             zstream.next_out = pkt_data + zstream.total_out;
964.             result = inflate(&zstream, Z_NO_FLUSH);
965.         } while (result==Z_OK && pkt_size<10000000);
                                      ^
966.         pkt_size = zstream.total_out;
967.         inflateEnd(&zstream);

libavformat/matroskadec.c:960:13: 
958.         zstream.avail_in = isize;
959.         do {
960.             pkt_size *= 3;
                 ^
961.             pkt_data = av_realloc(pkt_data, pkt_size);
962.             zstream.avail_out = pkt_size - zstream.total_out;

libavformat/matroskadec.c:961:13: 
959.         do {
960.             pkt_size *= 3;
961.             pkt_data = av_realloc(pkt_data, pkt_size);
                 ^
962.             zstream.avail_out = pkt_size - zstream.total_out;
963.             zstream.next_out = pkt_data + zstream.total_out;

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

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

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

libavutil/mem.c:135:1: return from a call to av_realloc
  133.     return realloc(ptr, size);
  134. #endif
  135. }
       ^
  136. 
  137. void av_free(void *ptr)
