libavcodec/resample2.c:187: error: Null Dereference
  pointer `c` last assigned on line 183 could be null and is dereferenced at line 187, column 5.

libavcodec/resample2.c:182:1: start of procedure av_resample_init()
180.  * Note, if either rate is not an integer then simply scale both rates up so they are.
181.  */
182. AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff){
     ^
183.     AVResampleContext *c= av_mallocz(sizeof(AVResampleContext));
184.     double factor= FFMIN(out_rate * cutoff / in_rate, 1.0);

libavcodec/resample2.c:183:5: 
181.  */
182. AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff){
183.     AVResampleContext *c= av_mallocz(sizeof(AVResampleContext));
         ^
184.     double factor= FFMIN(out_rate * cutoff / in_rate, 1.0);
185.     int phase_count= 1<<phase_shift;

libavutil/mem.c:132:1: start of procedure av_mallocz()
  130. }
  131. 
  132. void *av_mallocz(unsigned int size)
       ^
  133. {
  134.     void *ptr = av_malloc(size);

libavutil/mem.c:134:5: 
  132. void *av_mallocz(unsigned int size)
  133. {
  134.     void *ptr = av_malloc(size);
           ^
  135.     if (ptr)
  136.         memset(ptr, 0, size);

libavutil/mem.c:42:1: start of procedure av_malloc()
    40.    linker will do it automatically */
    41. 
    42. void *av_malloc(unsigned int size)
        ^
    43. {
    44.     void *ptr;

libavutil/mem.c:50:8: Taking false branch
    48. 
    49.     /* let's disallow possible ambiguous cases */
    50.     if(size > (INT_MAX-16) )
               ^
    51.         return NULL;
    52. 

libavutil/mem.c:61:5: Skipping memalign(): method has no implementation
    59.     ((char*)ptr)[-1]= diff;
    60. #elif defined (HAVE_MEMALIGN)
    61.     ptr = memalign(16,size);
            ^
    62.     /* Why 64?
    63.        Indeed, we should align it:

libavutil/mem.c:91:5: 
    89.     ptr = malloc(size);
    90. #endif
    91.     return ptr;
            ^
    92. }
    93. 

libavutil/mem.c:92:1: return from a call to av_malloc
    90. #endif
    91.     return ptr;
    92. }
        ^
    93. 
    94. void *av_realloc(void *ptr, unsigned int size)

libavutil/mem.c:135:9: Taking false branch
  133. {
  134.     void *ptr = av_malloc(size);
  135.     if (ptr)
               ^
  136.         memset(ptr, 0, size);
  137.     return ptr;

libavutil/mem.c:137:5: 
  135.     if (ptr)
  136.         memset(ptr, 0, size);
  137.     return ptr;
           ^
  138. }
  139. 

libavutil/mem.c:138:1: return from a call to av_mallocz
  136.         memset(ptr, 0, size);
  137.     return ptr;
  138. }
       ^
  139. 
  140. char *av_strdup(const char *s)

libavcodec/resample2.c:184:20: Condition is true
182. AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff){
183.     AVResampleContext *c= av_mallocz(sizeof(AVResampleContext));
184.     double factor= FFMIN(out_rate * cutoff / in_rate, 1.0);
                        ^
185.     int phase_count= 1<<phase_shift;
186. 

libavcodec/resample2.c:184:5: 
182. AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff){
183.     AVResampleContext *c= av_mallocz(sizeof(AVResampleContext));
184.     double factor= FFMIN(out_rate * cutoff / in_rate, 1.0);
         ^
185.     int phase_count= 1<<phase_shift;
186. 

libavcodec/resample2.c:185:5: 
183.     AVResampleContext *c= av_mallocz(sizeof(AVResampleContext));
184.     double factor= FFMIN(out_rate * cutoff / in_rate, 1.0);
185.     int phase_count= 1<<phase_shift;
         ^
186. 
187.     c->phase_shift= phase_shift;

libavcodec/resample2.c:187:5: 
185.     int phase_count= 1<<phase_shift;
186. 
187.     c->phase_shift= phase_shift;
         ^
188.     c->phase_mask= phase_count-1;
189.     c->linear= linear;
