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

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

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

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

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

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

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

cmdutils.c:1359:5: 
1357.     av_log_set_callback(log_callback_help);
1358. 
1359.     topic = av_strdup(arg ? arg : "");
          ^
1360.     if (!topic)
1361.         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:1360:10: Taking false branch
1358. 
1359.     topic = av_strdup(arg ? arg : "");
1360.     if (!topic)
               ^
1361.         return AVERROR(ENOMEM);
1362.     par = strchr(topic, '=');

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

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

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

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

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

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

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

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

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

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

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

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

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

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