cmdutils.c:1383: error: Memory Leak
  memory dynamically allocated by call to `av_strdup()` at line 1358, column 13 is not reachable after line 1383, column 5.

cmdutils.c:1353:1: start of procedure show_help()
1351. #endif
1352. 
1353. int show_help(void *optctx, const char *opt, const char *arg)
      ^
1354. {
1355.     char *topic, *par;

cmdutils.c:1356:5: 
1354. {
1355.     char *topic, *par;
1356.     av_log_set_callback(log_callback_help);
          ^
1357. 
1358.     topic = av_strdup(arg ? arg : "");

libavutil/log.c:201:1: start of procedure av_log_set_callback()
  199. }
  200. 
  201. void av_log_set_callback(void (*callback)(void*, int, const char*, va_list))
       ^
  202. {
  203.     av_log_callback = callback;

libavutil/log.c:203:5: 
  201. void av_log_set_callback(void (*callback)(void*, int, const char*, va_list))
  202. {
  203.     av_log_callback = callback;
           ^
  204. }
  205. 

libavutil/log.c:204:1: return from a call to av_log_set_callback
  202. {
  203.     av_log_callback = callback;
  204. }
       ^
  205. 
  206. static void missing_feature_sample(int sample, void *avc, const char *msg,

cmdutils.c:1358:23: Condition is true
1356.     av_log_set_callback(log_callback_help);
1357. 
1358.     topic = av_strdup(arg ? arg : "");
                            ^
1359.     if (!topic)
1360.         return AVERROR(ENOMEM);

cmdutils.c:1358:5: 
1356.     av_log_set_callback(log_callback_help);
1357. 
1358.     topic = av_strdup(arg ? arg : "");
          ^
1359.     if (!topic)
1360.         return AVERROR(ENOMEM);

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)

cmdutils.c:1359:10: Taking false branch
1357. 
1358.     topic = av_strdup(arg ? arg : "");
1359.     if (!topic)
               ^
1360.         return AVERROR(ENOMEM);
1361.     par = strchr(topic, '=');

cmdutils.c:1361:5: 
1359.     if (!topic)
1360.         return AVERROR(ENOMEM);
1361.     par = strchr(topic, '=');
          ^
1362.     if (par)
1363.         *par++ = 0;

cmdutils.c:1362:9: Taking false branch
1360.         return AVERROR(ENOMEM);
1361.     par = strchr(topic, '=');
1362.     if (par)
              ^
1363.         *par++ = 0;
1364. 

cmdutils.c:1365:10: Taking false branch
1363.         *par++ = 0;
1364. 
1365.     if (!*topic) {
               ^
1366.         show_help_default(topic, par);
1367.     } else if (!strcmp(topic, "decoder")) {

cmdutils.c:1367:17: Taking true branch
1365.     if (!*topic) {
1366.         show_help_default(topic, par);
1367.     } else if (!strcmp(topic, "decoder")) {
                      ^
1368.         show_help_codec(par, 0);
1369.     } else if (!strcmp(topic, "encoder")) {

cmdutils.c:1368:9: 
1366.         show_help_default(topic, par);
1367.     } else if (!strcmp(topic, "decoder")) {
1368.         show_help_codec(par, 0);
              ^
1369.     } else if (!strcmp(topic, "encoder")) {
1370.         show_help_codec(par, 1);

cmdutils.c:1224:1: start of procedure show_help_codec()
  1222. }
  1223. 
  1224. static void show_help_codec(const char *name, int encoder)
        ^
  1225. {
  1226.     const AVCodecDescriptor *desc;

cmdutils.c:1229:10: Taking false branch
  1227.     const AVCodec *codec;
  1228. 
  1229.     if (!name) {
                 ^
  1230.         av_log(NULL, AV_LOG_ERROR, "No codec name specified.\n");
  1231.         return;

cmdutils.c:1234:13: Condition is false
  1232.     }
  1233. 
  1234.     codec = encoder ? avcodec_find_encoder_by_name(name) :
                    ^
  1235.                       avcodec_find_decoder_by_name(name);
  1236. 

cmdutils.c:1234:5: 
  1232.     }
  1233. 
  1234.     codec = encoder ? avcodec_find_encoder_by_name(name) :
            ^
  1235.                       avcodec_find_decoder_by_name(name);
  1236. 

cmdutils.c:1237:9: Taking true branch
  1235.                       avcodec_find_decoder_by_name(name);
  1236. 
  1237.     if (codec)
                ^
  1238.         print_codec(codec);
  1239.     else if ((desc = avcodec_descriptor_get_by_name(name))) {

cmdutils.c:1238:9: Skipping print_codec(): empty list of specs
  1236. 
  1237.     if (codec)
  1238.         print_codec(codec);
                ^
  1239.     else if ((desc = avcodec_descriptor_get_by_name(name))) {
  1240.         int printed = 0;

cmdutils.c:1237:5: 
  1235.                       avcodec_find_decoder_by_name(name);
  1236. 
  1237.     if (codec)
            ^
  1238.         print_codec(codec);
  1239.     else if ((desc = avcodec_descriptor_get_by_name(name))) {

cmdutils.c:1257:1: return from a call to show_help_codec
  1255.                name);
  1256.     }
  1257. }
        ^
  1258. 
  1259. static void show_help_demuxer(const char *name)

cmdutils.c:1383:5: Skipping av_freep(): empty list of specs
1381.     }
1382. 
1383.     av_freep(&topic);
          ^
1384.     return 0;
1385. }
