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

cmdutils.c:1386:1: start of procedure show_help()
1384. #endif
1385. 
1386. int show_help(void *optctx, const char *opt, const char *arg)
      ^
1387. {
1388.     char *topic, *par;

cmdutils.c:1389:5: 
1387. {
1388.     char *topic, *par;
1389.     av_log_set_callback(log_callback_help);
          ^
1390. 
1391.     topic = av_strdup(arg ? arg : "");

libavutil/log.c:215:1: start of procedure av_log_set_callback()
  213. }
  214. 
  215. void av_log_set_callback(void (*callback)(void*, int, const char*, va_list))
       ^
  216. {
  217.     av_log_callback = callback;

libavutil/log.c:217:5: 
  215. void av_log_set_callback(void (*callback)(void*, int, const char*, va_list))
  216. {
  217.     av_log_callback = callback;
           ^
  218. }
  219. 

libavutil/log.c:218:1: return from a call to av_log_set_callback
  216. {
  217.     av_log_callback = callback;
  218. }
       ^
  219. 
  220. static void missing_feature_sample(int sample, void *avc, const char *msg,

cmdutils.c:1391:23: Condition is true
1389.     av_log_set_callback(log_callback_help);
1390. 
1391.     topic = av_strdup(arg ? arg : "");
                            ^
1392.     if (!topic)
1393.         return AVERROR(ENOMEM);

cmdutils.c:1391:5: 
1389.     av_log_set_callback(log_callback_help);
1390. 
1391.     topic = av_strdup(arg ? arg : "");
          ^
1392.     if (!topic)
1393.         return AVERROR(ENOMEM);

libavutil/mem.c:196:1: start of procedure av_strdup()
  194. }
  195. 
  196. char *av_strdup(const char *s)
       ^
  197. {
  198.     char *ptr = NULL;

libavutil/mem.c:198:5: 
  196. char *av_strdup(const char *s)
  197. {
  198.     char *ptr = NULL;
           ^
  199.     if (s) {
  200.         int len = strlen(s) + 1;

libavutil/mem.c:199:9: Taking true branch
  197. {
  198.     char *ptr = NULL;
  199.     if (s) {
               ^
  200.         int len = strlen(s) + 1;
  201.         ptr = av_realloc(NULL, len);

libavutil/mem.c:200:9: 
  198.     char *ptr = NULL;
  199.     if (s) {
  200.         int len = strlen(s) + 1;
               ^
  201.         ptr = av_realloc(NULL, len);
  202.         if (ptr)

libavutil/mem.c:201:9: 
  199.     if (s) {
  200.         int len = strlen(s) + 1;
  201.         ptr = av_realloc(NULL, len);
               ^
  202.         if (ptr)
  203.             memcpy(ptr, s, len);

libavutil/mem.c:107:1: start of procedure av_realloc()
    105. }
    106. 
    107. void *av_realloc(void *ptr, size_t size)
         ^
    108. {
    109.     /* let's disallow possibly ambiguous cases */

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

libavutil/mem.c:116:5: 
    114.     return _aligned_realloc(ptr, size, 32);
    115. #else
    116.     return realloc(ptr, size);
             ^
    117. #endif
    118. }

libavutil/mem.c:118:1: return from a call to av_realloc
    116.     return realloc(ptr, size);
    117. #endif
    118. }
         ^
    119. 
    120. int av_reallocp(void *ptr, size_t size)

libavutil/mem.c:202:13: Taking true branch
  200.         int len = strlen(s) + 1;
  201.         ptr = av_realloc(NULL, len);
  202.         if (ptr)
                   ^
  203.             memcpy(ptr, s, len);
  204.     }

libavutil/mem.c:203:13: 
  201.         ptr = av_realloc(NULL, len);
  202.         if (ptr)
  203.             memcpy(ptr, s, len);
                   ^
  204.     }
  205.     return ptr;

libavutil/mem.c:205:5: 
  203.             memcpy(ptr, s, len);
  204.     }
  205.     return ptr;
           ^
  206. }
  207. 

libavutil/mem.c:206:1: return from a call to av_strdup
  204.     }
  205.     return ptr;
  206. }
       ^
  207. 
  208. char *av_strndup(const char *s, size_t len)

cmdutils.c:1392:10: Taking false branch
1390. 
1391.     topic = av_strdup(arg ? arg : "");
1392.     if (!topic)
               ^
1393.         return AVERROR(ENOMEM);
1394.     par = strchr(topic, '=');

cmdutils.c:1394:5: 
1392.     if (!topic)
1393.         return AVERROR(ENOMEM);
1394.     par = strchr(topic, '=');
          ^
1395.     if (par)
1396.         *par++ = 0;

cmdutils.c:1395:9: Taking false branch
1393.         return AVERROR(ENOMEM);
1394.     par = strchr(topic, '=');
1395.     if (par)
              ^
1396.         *par++ = 0;
1397. 

cmdutils.c:1398:10: Taking false branch
1396.         *par++ = 0;
1397. 
1398.     if (!*topic) {
               ^
1399.         show_help_default(topic, par);
1400.     } else if (!strcmp(topic, "decoder")) {

cmdutils.c:1400:17: Taking true branch
1398.     if (!*topic) {
1399.         show_help_default(topic, par);
1400.     } else if (!strcmp(topic, "decoder")) {
                      ^
1401.         show_help_codec(par, 0);
1402.     } else if (!strcmp(topic, "encoder")) {

cmdutils.c:1401:9: 
1399.         show_help_default(topic, par);
1400.     } else if (!strcmp(topic, "decoder")) {
1401.         show_help_codec(par, 0);
              ^
1402.     } else if (!strcmp(topic, "encoder")) {
1403.         show_help_codec(par, 1);

cmdutils.c:1257:1: start of procedure show_help_codec()
  1255. }
  1256. 
  1257. static void show_help_codec(const char *name, int encoder)
        ^
  1258. {
  1259.     const AVCodecDescriptor *desc;

cmdutils.c:1262:10: Taking false branch
  1260.     const AVCodec *codec;
  1261. 
  1262.     if (!name) {
                 ^
  1263.         av_log(NULL, AV_LOG_ERROR, "No codec name specified.\n");
  1264.         return;

cmdutils.c:1267:13: Condition is false
  1265.     }
  1266. 
  1267.     codec = encoder ? avcodec_find_encoder_by_name(name) :
                    ^
  1268.                       avcodec_find_decoder_by_name(name);
  1269. 

cmdutils.c:1267:5: 
  1265.     }
  1266. 
  1267.     codec = encoder ? avcodec_find_encoder_by_name(name) :
            ^
  1268.                       avcodec_find_decoder_by_name(name);
  1269. 

cmdutils.c:1270:9: Taking true branch
  1268.                       avcodec_find_decoder_by_name(name);
  1269. 
  1270.     if (codec)
                ^
  1271.         print_codec(codec);
  1272.     else if ((desc = avcodec_descriptor_get_by_name(name))) {

cmdutils.c:1271:9: Skipping print_codec(): empty list of specs
  1269. 
  1270.     if (codec)
  1271.         print_codec(codec);
                ^
  1272.     else if ((desc = avcodec_descriptor_get_by_name(name))) {
  1273.         int printed = 0;

cmdutils.c:1270:5: 
  1268.                       avcodec_find_decoder_by_name(name);
  1269. 
  1270.     if (codec)
            ^
  1271.         print_codec(codec);
  1272.     else if ((desc = avcodec_descriptor_get_by_name(name))) {

cmdutils.c:1290:1: return from a call to show_help_codec
  1288.                name);
  1289.     }
  1290. }
        ^
  1291. 
  1292. static void show_help_demuxer(const char *name)

cmdutils.c:1416:5: Skipping av_freep(): empty list of specs
1414.     }
1415. 
1416.     av_freep(&topic);
          ^
1417.     return 0;
1418. }

int show_help(void *optctx, const char *opt, const char *arg)
{
    char *topic, *par;
    av_log_set_callback(log_callback_help);
    topic = av_strdup(arg ? arg : "");
    if (!topic)
        return AVERROR(ENOMEM);
    par = strchr(topic, '=');
    if (par)
        *par++ = 0;
    if (!*topic) {
        show_help_default(topic, par);
    } else if (!strcmp(topic, "decoder")) {
        show_help_codec(par, 0);
    } else if (!strcmp(topic, "encoder")) {
        show_help_codec(par, 1);
    } else if (!strcmp(topic, "demuxer")) {
        show_help_demuxer(par);
    } else if (!strcmp(topic, "muxer")) {
        show_help_muxer(par);
#if CONFIG_AVFILTER
    } else if (!strcmp(topic, "filter")) {
        show_help_filter(par);
#endif
    } else {
        show_help_default(topic, par);
    }
    av_freep(&topic);
    return 0;
}
['int show_help(void *optctx, const char *opt, const char *arg)\n{\n    char *topic, *par;\n    av_log_set_callback(log_callback_help);\n    topic = av_strdup(arg ? arg : "");\n    if (!topic)\n        return AVERROR(ENOMEM);\n    par = strchr(topic, \'=\');\n    if (par)\n        *par++ = 0;\n    if (!*topic) {\n        show_help_default(topic, par);\n    } else if (!strcmp(topic, "decoder")) {\n        show_help_codec(par, 0);\n    } else if (!strcmp(topic, "encoder")) {\n        show_help_codec(par, 1);\n    } else if (!strcmp(topic, "demuxer")) {\n        show_help_demuxer(par);\n    } else if (!strcmp(topic, "muxer")) {\n        show_help_muxer(par);\n#if CONFIG_AVFILTER\n    } else if (!strcmp(topic, "filter")) {\n        show_help_filter(par);\n#endif\n    } else {\n        show_help_default(topic, par);\n    }\n    av_freep(&topic);\n    return 0;\n}', 'void av_log_set_callback(void (*callback)(void*, int, const char*, va_list))\n{\n    av_log_callback = callback;\n}', 'char *av_strdup(const char *s)\n{\n    char *ptr = NULL;\n    if (s) {\n        int len = strlen(s) + 1;\n        ptr = av_realloc(NULL, len);\n        if (ptr)\n            memcpy(ptr, s, len);\n    }\n    return ptr;\n}', 'void *av_realloc(void *ptr, size_t size)\n{\n    if (size > (INT_MAX - 16))\n        return NULL;\n#if HAVE_ALIGNED_MALLOC\n    return _aligned_realloc(ptr, size, 32);\n#else\n    return realloc(ptr, size);\n#endif\n}', 'static void show_help_codec(const char *name, int encoder)\n{\n    const AVCodecDescriptor *desc;\n    const AVCodec *codec;\n    if (!name) {\n        av_log(NULL, AV_LOG_ERROR, "No codec name specified.\\n");\n        return;\n    }\n    codec = encoder ? avcodec_find_encoder_by_name(name) :\n                      avcodec_find_decoder_by_name(name);\n    if (codec)\n        print_codec(codec);\n    else if ((desc = avcodec_descriptor_get_by_name(name))) {\n        int printed = 0;\n        while ((codec = next_codec_for_id(desc->id, codec, encoder))) {\n            printed = 1;\n            print_codec(codec);\n        }\n        if (!printed) {\n            av_log(NULL, AV_LOG_ERROR, "Codec \'%s\' is known to Libav, "\n                   "but no %s for it are available. Libav might need to be "\n                   "recompiled with additional external libraries.\\n",\n                   name, encoder ? "encoders" : "decoders");\n        }\n    } else {\n        av_log(NULL, AV_LOG_ERROR, "Codec \'%s\' is not recognized by Libav.\\n",\n               name);\n    }\n}']