libavfilter/formats.c:137: error: Null Dereference
  pointer `f->refs` last assigned on line 136 could be null and is dereferenced at line 137, column 5.

libavfilter/formats.c:133:1: start of procedure avfilter_formats_ref()
131. }
132. 
133. void avfilter_formats_ref(AVFilterFormats *f, AVFilterFormats **ref)
     ^
134. {
135.     *ref = f;

libavfilter/formats.c:135:5: 
133. void avfilter_formats_ref(AVFilterFormats *f, AVFilterFormats **ref)
134. {
135.     *ref = f;
         ^
136.     f->refs = av_realloc(f->refs, sizeof(AVFilterFormats**) * ++f->refcount);
137.     f->refs[f->refcount-1] = ref;

libavfilter/formats.c:136:5: 
134. {
135.     *ref = f;
136.     f->refs = av_realloc(f->refs, sizeof(AVFilterFormats**) * ++f->refcount);
         ^
137.     f->refs[f->refcount-1] = ref;
138. }

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:8: Taking false branch
  122. 
  123.     /* let's disallow possible ambiguous cases */
  124.     if(size > (INT_MAX-16) )
              ^
  125.         return NULL;
  126. 

libavutil/mem.c:133:5: 
  131.     return (char*)realloc((char*)ptr - diff, size + diff) + diff;
  132. #else
  133.     return realloc(ptr, size);
           ^
  134. #endif
  135. }

libavutil/mem.c:135:1: return from a call to av_realloc
  133.     return realloc(ptr, size);
  134. #endif
  135. }
       ^
  136. 
  137. void av_free(void *ptr)

libavfilter/formats.c:137:5: 
135.     *ref = f;
136.     f->refs = av_realloc(f->refs, sizeof(AVFilterFormats**) * ++f->refcount);
137.     f->refs[f->refcount-1] = ref;
         ^
138. }
139. 
