avconv.c:1809: error: Null Dereference
  pointer `avc` last assigned on line 1804 could be null and is dereferenced at line 1809, column 9.

avconv.c:1800:1: start of procedure print_sdp()
1798. }
1799. 
1800. static void print_sdp(OutputFile *output_files, int n)
      ^
1801. {
1802.     char sdp[2048];

avconv.c:1804:5: 
1802.     char sdp[2048];
1803.     int i;
1804.     AVFormatContext **avc = av_malloc(sizeof(*avc)*n);
          ^
1805. 
1806.     if (!avc)

libavutil/mem.c:64:1: start of procedure av_malloc()
  62.    linker will do it automatically. */
  63. 
  64. void *av_malloc(size_t size)
      ^
  65. {
  66.     void *ptr = NULL;

libavutil/mem.c:66:5: 
  64. void *av_malloc(size_t size)
  65. {
  66.     void *ptr = NULL;
          ^
  67. #if CONFIG_MEMALIGN_HACK
  68.     long diff;

libavutil/mem.c:72:8: Taking true branch
  70. 
  71.     /* let's disallow possible ambiguous cases */
  72.     if(size > (INT_MAX-32) )
             ^
  73.         return NULL;
  74. 

libavutil/mem.c:73:9: 
  71.     /* let's disallow possible ambiguous cases */
  72.     if(size > (INT_MAX-32) )
  73.         return NULL;
              ^
  74. 
  75. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:115:1: return from a call to av_malloc
  113. #endif
  114.     return ptr;
  115. }
       ^
  116. 
  117. void *av_realloc(void *ptr, size_t size)

avconv.c:1806:10: Taking true branch
1804.     AVFormatContext **avc = av_malloc(sizeof(*avc)*n);
1805. 
1806.     if (!avc)
               ^
1807.         exit_program(1);
1808.     for (i = 0; i < n; i++)

avconv.c:1807:9: Skipping exit_program(): empty list of specs
1805. 
1806.     if (!avc)
1807.         exit_program(1);
              ^
1808.     for (i = 0; i < n; i++)
1809.         avc[i] = output_files[i].ctx;

avconv.c:1808:10: 
1806.     if (!avc)
1807.         exit_program(1);
1808.     for (i = 0; i < n; i++)
               ^
1809.         avc[i] = output_files[i].ctx;
1810. 

avconv.c:1808:17: Loop condition is true. Entering loop body
1806.     if (!avc)
1807.         exit_program(1);
1808.     for (i = 0; i < n; i++)
                      ^
1809.         avc[i] = output_files[i].ctx;
1810. 

avconv.c:1809:9: 
1807.         exit_program(1);
1808.     for (i = 0; i < n; i++)
1809.         avc[i] = output_files[i].ctx;
              ^
1810. 
1811.     av_sdp_create(avc, n, sdp, sizeof(sdp));

static void print_sdp(OutputFile *output_files, int n)
{
    char sdp[2048];
    int i;
    AVFormatContext **avc = av_malloc(sizeof(*avc)*n);
    if (!avc)
        exit_program(1);
    for (i = 0; i < n; i++)
        avc[i] = output_files[i].ctx;
    av_sdp_create(avc, n, sdp, sizeof(sdp));
    printf("SDP:\n%s\n", sdp);
    fflush(stdout);
    av_freep(&avc);
}
['static void print_sdp(OutputFile *output_files, int n)\n{\n    char sdp[2048];\n    int i;\n    AVFormatContext **avc = av_malloc(sizeof(*avc)*n);\n    if (!avc)\n        exit_program(1);\n    for (i = 0; i < n; i++)\n        avc[i] = output_files[i].ctx;\n    av_sdp_create(avc, n, sdp, sizeof(sdp));\n    printf("SDP:\\n%s\\n", sdp);\n    fflush(stdout);\n    av_freep(&avc);\n}', 'void *av_malloc(size_t size)\n{\n    void *ptr = NULL;\n#if CONFIG_MEMALIGN_HACK\n    long diff;\n#endif\n    if(size > (INT_MAX-32) )\n        return NULL;\n#if CONFIG_MEMALIGN_HACK\n    ptr = malloc(size+32);\n    if(!ptr)\n        return ptr;\n    diff= ((-(long)ptr - 1)&31) + 1;\n    ptr = (char*)ptr + diff;\n    ((char*)ptr)[-1]= diff;\n#elif HAVE_POSIX_MEMALIGN\n    if (posix_memalign(&ptr,32,size))\n        ptr = NULL;\n#elif HAVE_MEMALIGN\n    ptr = memalign(32,size);\n#else\n    ptr = malloc(size);\n#endif\n    return ptr;\n}']