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

avconv.c:1839:1: start of procedure print_sdp()
1837. }
1838. 
1839. static void print_sdp(OutputFile *output_files, int n)
      ^
1840. {
1841.     char sdp[2048];

avconv.c:1843:5: 
1841.     char sdp[2048];
1842.     int i;
1843.     AVFormatContext **avc = av_malloc(sizeof(*avc)*n);
          ^
1844. 
1845.     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:1845:10: Taking true branch
1843.     AVFormatContext **avc = av_malloc(sizeof(*avc)*n);
1844. 
1845.     if (!avc)
               ^
1846.         exit_program(1);
1847.     for (i = 0; i < n; i++)

avconv.c:1846:9: Skipping exit_program(): empty list of specs
1844. 
1845.     if (!avc)
1846.         exit_program(1);
              ^
1847.     for (i = 0; i < n; i++)
1848.         avc[i] = output_files[i].ctx;

avconv.c:1847:10: 
1845.     if (!avc)
1846.         exit_program(1);
1847.     for (i = 0; i < n; i++)
               ^
1848.         avc[i] = output_files[i].ctx;
1849. 

avconv.c:1847:17: Loop condition is true. Entering loop body
1845.     if (!avc)
1846.         exit_program(1);
1847.     for (i = 0; i < n; i++)
                      ^
1848.         avc[i] = output_files[i].ctx;
1849. 

avconv.c:1848:9: 
1846.         exit_program(1);
1847.     for (i = 0; i < n; i++)
1848.         avc[i] = output_files[i].ctx;
              ^
1849. 
1850.     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}']