avprobe.c:340: error: Memory Leak
  memory dynamically allocated by call to `av_strdup()` at line 331, column 15 is not reachable after line 340, column 5.

avprobe.c:324:1: start of procedure old_print_object_header()
322.  * old-style pseudo-INI
323.  */
324. static void old_print_object_header(const char *name)
     ^
325. {
326.     char *str, *p;

avprobe.c:328:10: Taking false branch
326.     char *str, *p;
327. 
328.     if (!strcmp(name, "tags"))
              ^
329.         return;
330. 

avprobe.c:331:5: 
329.         return;
330. 
331.     str = p = av_strdup(name);
         ^
332.     if (!str)
333.         return;

libavutil/mem.c:219:1: start of procedure av_strdup()
  217. }
  218. 
  219. char *av_strdup(const char *s)
       ^
  220. {
  221.     char *ptr = NULL;

libavutil/mem.c:221:5: 
  219. char *av_strdup(const char *s)
  220. {
  221.     char *ptr = NULL;
           ^
  222.     if (s) {
  223.         int len = strlen(s) + 1;

libavutil/mem.c:222:9: Taking true branch
  220. {
  221.     char *ptr = NULL;
  222.     if (s) {
               ^
  223.         int len = strlen(s) + 1;
  224.         ptr = av_realloc(NULL, len);

libavutil/mem.c:223:9: 
  221.     char *ptr = NULL;
  222.     if (s) {
  223.         int len = strlen(s) + 1;
               ^
  224.         ptr = av_realloc(NULL, len);
  225.         if (ptr)

libavutil/mem.c:224:9: 
  222.     if (s) {
  223.         int len = strlen(s) + 1;
  224.         ptr = av_realloc(NULL, len);
               ^
  225.         if (ptr)
  226.             memcpy(ptr, s, len);

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:9: Taking false branch
    122. 
    123.     /* let's disallow possibly ambiguous cases */
    124.     if (size > (INT_MAX - 16))
                 ^
    125.         return NULL;
    126. 

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

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

libavutil/mem.c:225:13: Taking true branch
  223.         int len = strlen(s) + 1;
  224.         ptr = av_realloc(NULL, len);
  225.         if (ptr)
                   ^
  226.             memcpy(ptr, s, len);
  227.     }

libavutil/mem.c:226:13: 
  224.         ptr = av_realloc(NULL, len);
  225.         if (ptr)
  226.             memcpy(ptr, s, len);
                   ^
  227.     }
  228.     return ptr;

libavutil/mem.c:228:5: 
  226.             memcpy(ptr, s, len);
  227.     }
  228.     return ptr;
           ^
  229. }
  230. 

libavutil/mem.c:229:1: return from a call to av_strdup
  227.     }
  228.     return ptr;
  229. }
       ^
  230. 
  231. char *av_strndup(const char *s, size_t len)

avprobe.c:332:10: Taking false branch
330. 
331.     str = p = av_strdup(name);
332.     if (!str)
              ^
333.         return;
334.     while (*p) {

avprobe.c:334:12: Loop condition is true. Entering loop body
332.     if (!str)
333.         return;
334.     while (*p) {
                ^
335.         *p = av_toupper(*p);
336.         p++;

avprobe.c:335:9: 
333.         return;
334.     while (*p) {
335.         *p = av_toupper(*p);
             ^
336.         p++;
337.     }

libavutil/avstring.h:172:1: start of procedure av_toupper()
  170.  * Locale-independent conversion of ASCII characters to uppercase.
  171.  */
  172. static inline av_const int av_toupper(int c)
       ^
  173. {
  174.     if (c >= 'a' && c <= 'z')

libavutil/avstring.h:174:9: Taking false branch
  172. static inline av_const int av_toupper(int c)
  173. {
  174.     if (c >= 'a' && c <= 'z')
               ^
  175.         c ^= 0x20;
  176.     return c;

libavutil/avstring.h:176:5: 
  174.     if (c >= 'a' && c <= 'z')
  175.         c ^= 0x20;
  176.     return c;
           ^
  177. }
  178. 

libavutil/avstring.h:177:1: return from a call to av_toupper
  175.         c ^= 0x20;
  176.     return c;
  177. }
       ^
  178. 
  179. /**

avprobe.c:336:9: 
334.     while (*p) {
335.         *p = av_toupper(*p);
336.         p++;
             ^
337.     }
338. 

avprobe.c:334:12: Loop condition is false. Leaving loop
332.     if (!str)
333.         return;
334.     while (*p) {
                ^
335.         *p = av_toupper(*p);
336.         p++;

avprobe.c:339:5: 
337.     }
338. 
339.     avio_printf(probe_out, "[%s]\n", str);
         ^
340.     av_freep(&str);
341. }

libavformat/aviobuf.c:823:1: start of procedure avio_printf()
  821. }
  822. 
  823. int avio_printf(AVIOContext *s, const char *fmt, ...)
       ^
  824. {
  825.     va_list ap;

libavformat/aviobuf.c:829:5: 
  827.     int ret;
  828. 
  829.     va_start(ap, fmt);
           ^
  830.     ret = vsnprintf(buf, sizeof(buf), fmt, ap);
  831.     va_end(ap);

libavformat/aviobuf.c:830:5: 
  828. 
  829.     va_start(ap, fmt);
  830.     ret = vsnprintf(buf, sizeof(buf), fmt, ap);
           ^
  831.     va_end(ap);
  832.     avio_write(s, buf, strlen(buf));

libavformat/aviobuf.c:831:5: 
  829.     va_start(ap, fmt);
  830.     ret = vsnprintf(buf, sizeof(buf), fmt, ap);
  831.     va_end(ap);
           ^
  832.     avio_write(s, buf, strlen(buf));
  833.     return ret;

libavformat/aviobuf.c:832:5: Skipping avio_write(): empty list of specs
  830.     ret = vsnprintf(buf, sizeof(buf), fmt, ap);
  831.     va_end(ap);
  832.     avio_write(s, buf, strlen(buf));
           ^
  833.     return ret;
  834. }

libavformat/aviobuf.c:833:5: 
  831.     va_end(ap);
  832.     avio_write(s, buf, strlen(buf));
  833.     return ret;
           ^
  834. }
  835. 

libavformat/aviobuf.c:834:1: return from a call to avio_printf
  832.     avio_write(s, buf, strlen(buf));
  833.     return ret;
  834. }
       ^
  835. 
  836. int avio_pause(AVIOContext *s, int pause)

avprobe.c:340:5: Skipping av_freep(): empty list of specs
338. 
339.     avio_printf(probe_out, "[%s]\n", str);
340.     av_freep(&str);
         ^
341. }
342. 
