libavcodec/iirfilter.c:72: error: Null Dereference
  pointer `c->cx` last assigned on line 66 could be null and is dereferenced at line 72, column 5.

libavcodec/iirfilter.c:50:9: start of procedure ff_iir_filter_init_coeffs()
48. #define MAXORDER 30
49. 
50. av_cold struct FFIIRFilterCoeffs* ff_iir_filter_init_coeffs(enum IIRFilterType filt_type,
            ^
51.                                                     enum IIRFilterMode filt_mode,
52.                                                     int order, float cutoff_ratio,

libavcodec/iirfilter.c:60:8: Taking false branch
58.     double p[MAXORDER + 1][2];
59. 
60.     if(filt_type != FF_FILTER_TYPE_BUTTERWORTH || filt_mode != FF_FILTER_MODE_LOWPASS)
           ^
61.         return NULL;
62.     if(order <= 1 || (order & 1) || order > MAXORDER || cutoff_ratio >= 1.0)

libavcodec/iirfilter.c:60:51: Taking false branch
58.     double p[MAXORDER + 1][2];
59. 
60.     if(filt_type != FF_FILTER_TYPE_BUTTERWORTH || filt_mode != FF_FILTER_MODE_LOWPASS)
                                                      ^
61.         return NULL;
62.     if(order <= 1 || (order & 1) || order > MAXORDER || cutoff_ratio >= 1.0)

libavcodec/iirfilter.c:62:8: Taking false branch
60.     if(filt_type != FF_FILTER_TYPE_BUTTERWORTH || filt_mode != FF_FILTER_MODE_LOWPASS)
61.         return NULL;
62.     if(order <= 1 || (order & 1) || order > MAXORDER || cutoff_ratio >= 1.0)
           ^
63.         return NULL;
64. 

libavcodec/iirfilter.c:62:23: Taking false branch
60.     if(filt_type != FF_FILTER_TYPE_BUTTERWORTH || filt_mode != FF_FILTER_MODE_LOWPASS)
61.         return NULL;
62.     if(order <= 1 || (order & 1) || order > MAXORDER || cutoff_ratio >= 1.0)
                          ^
63.         return NULL;
64. 

libavcodec/iirfilter.c:62:37: Taking false branch
60.     if(filt_type != FF_FILTER_TYPE_BUTTERWORTH || filt_mode != FF_FILTER_MODE_LOWPASS)
61.         return NULL;
62.     if(order <= 1 || (order & 1) || order > MAXORDER || cutoff_ratio >= 1.0)
                                        ^
63.         return NULL;
64. 

libavcodec/iirfilter.c:62:57: Taking false branch
60.     if(filt_type != FF_FILTER_TYPE_BUTTERWORTH || filt_mode != FF_FILTER_MODE_LOWPASS)
61.         return NULL;
62.     if(order <= 1 || (order & 1) || order > MAXORDER || cutoff_ratio >= 1.0)
                                                            ^
63.         return NULL;
64. 

libavcodec/iirfilter.c:65:5: 
63.         return NULL;
64. 
65.     c = av_malloc(sizeof(FFIIRFilterCoeffs));
        ^
66.     c->cx = av_malloc(sizeof(c->cx[0]) * ((order >> 1) + 1));
67.     c->cy = av_malloc(sizeof(c->cy[0]) * order);

libavutil/mem.c:47:1: start of procedure av_malloc()
  45.    linker will do it automatically. */
  46. 
  47. void *av_malloc(unsigned int size)
      ^
  48. {
  49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
  47. void *av_malloc(unsigned int size)
  48. {
  49.     void *ptr = NULL;
          ^
  50. #if CONFIG_MEMALIGN_HACK
  51.     long diff;

libavutil/mem.c:55:8: Taking false branch
  53. 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
             ^
  56.         return NULL;
  57. 

libavutil/mem.c:66:9: Taking false branch
  64.     ((char*)ptr)[-1]= diff;
  65. #elif HAVE_POSIX_MEMALIGN
  66.     if (posix_memalign(&ptr,16,size))
              ^
  67.         ptr = NULL;
  68. #elif HAVE_MEMALIGN

libavutil/mem.c:99:5: 
   97.     ptr = malloc(size);
   98. #endif
   99.     return ptr;
           ^
  100. }
  101. 

libavutil/mem.c:100:1: return from a call to av_malloc
   98. #endif
   99.     return ptr;
  100. }
       ^
  101. 
  102. void *av_realloc(void *ptr, unsigned int size)

libavcodec/iirfilter.c:66:5: 
64. 
65.     c = av_malloc(sizeof(FFIIRFilterCoeffs));
66.     c->cx = av_malloc(sizeof(c->cx[0]) * ((order >> 1) + 1));
        ^
67.     c->cy = av_malloc(sizeof(c->cy[0]) * order);
68.     c->order = order;

libavutil/mem.c:47:1: start of procedure av_malloc()
  45.    linker will do it automatically. */
  46. 
  47. void *av_malloc(unsigned int size)
      ^
  48. {
  49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
  47. void *av_malloc(unsigned int size)
  48. {
  49.     void *ptr = NULL;
          ^
  50. #if CONFIG_MEMALIGN_HACK
  51.     long diff;

libavutil/mem.c:55:8: Taking true branch
  53. 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
             ^
  56.         return NULL;
  57. 

libavutil/mem.c:56:9: 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
  56.         return NULL;
              ^
  57. 
  58. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:100:1: return from a call to av_malloc
   98. #endif
   99.     return ptr;
  100. }
       ^
  101. 
  102. void *av_realloc(void *ptr, unsigned int size)

libavcodec/iirfilter.c:67:5: 
65.     c = av_malloc(sizeof(FFIIRFilterCoeffs));
66.     c->cx = av_malloc(sizeof(c->cx[0]) * ((order >> 1) + 1));
67.     c->cy = av_malloc(sizeof(c->cy[0]) * order);
        ^
68.     c->order = order;
69. 

libavutil/mem.c:47:1: start of procedure av_malloc()
  45.    linker will do it automatically. */
  46. 
  47. void *av_malloc(unsigned int size)
      ^
  48. {
  49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
  47. void *av_malloc(unsigned int size)
  48. {
  49.     void *ptr = NULL;
          ^
  50. #if CONFIG_MEMALIGN_HACK
  51.     long diff;

libavutil/mem.c:55:8: Taking false branch
  53. 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
             ^
  56.         return NULL;
  57. 

libavutil/mem.c:66:9: Taking false branch
  64.     ((char*)ptr)[-1]= diff;
  65. #elif HAVE_POSIX_MEMALIGN
  66.     if (posix_memalign(&ptr,16,size))
              ^
  67.         ptr = NULL;
  68. #elif HAVE_MEMALIGN

libavutil/mem.c:99:5: 
   97.     ptr = malloc(size);
   98. #endif
   99.     return ptr;
           ^
  100. }
  101. 

libavutil/mem.c:100:1: return from a call to av_malloc
   98. #endif
   99.     return ptr;
  100. }
       ^
  101. 
  102. void *av_realloc(void *ptr, unsigned int size)

libavcodec/iirfilter.c:68:5: 
66.     c->cx = av_malloc(sizeof(c->cx[0]) * ((order >> 1) + 1));
67.     c->cy = av_malloc(sizeof(c->cy[0]) * order);
68.     c->order = order;
        ^
69. 
70.     wa = 2 * tan(M_PI * 0.5 * cutoff_ratio);

libavcodec/iirfilter.c:70:5: 
68.     c->order = order;
69. 
70.     wa = 2 * tan(M_PI * 0.5 * cutoff_ratio);
        ^
71. 
72.     c->cx[0] = 1;

libavcodec/iirfilter.c:72:5: 
70.     wa = 2 * tan(M_PI * 0.5 * cutoff_ratio);
71. 
72.     c->cx[0] = 1;
        ^
73.     for(i = 1; i < (order >> 1) + 1; i++)
74.         c->cx[i] = c->cx[i - 1] * (order - i + 1LL) / i;
