libavformat/oggdec.c:61: error: Null Dereference
  pointer `ost` last assigned on line 58 could be null and is dereferenced at line 61, column 5.

libavformat/oggdec.c:54:1: start of procedure ogg_save()
52. 
53. //FIXME We could avoid some structure duplication
54. static int
    ^
55. ogg_save (AVFormatContext * s)
56. {

libavformat/oggdec.c:57:5: 
55. ogg_save (AVFormatContext * s)
56. {
57.     struct ogg *ogg = s->priv_data;
        ^
58.     struct ogg_state *ost =
59.         av_malloc(sizeof (*ost) + (ogg->nstreams-1) * sizeof (*ogg->streams));

libavformat/oggdec.c:58:5: 
56. {
57.     struct ogg *ogg = s->priv_data;
58.     struct ogg_state *ost =
        ^
59.         av_malloc(sizeof (*ost) + (ogg->nstreams-1) * sizeof (*ogg->streams));
60.     int i;

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 true 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:67:9: 
  65. #elif HAVE_POSIX_MEMALIGN
  66.     if (posix_memalign(&ptr,16,size))
  67.         ptr = NULL;
              ^
  68. #elif HAVE_MEMALIGN
  69.     ptr = memalign(16,size);

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)

libavformat/oggdec.c:61:5: 
59.         av_malloc(sizeof (*ost) + (ogg->nstreams-1) * sizeof (*ogg->streams));
60.     int i;
61.     ost->pos = url_ftell (s->pb);
        ^
62.     ost->curidx = ogg->curidx;
63.     ost->next = ogg->state;

libavformat/aviobuf.c:186:1: start of procedure url_ftell()
  184. }
  185. 
  186. int64_t url_ftell(ByteIOContext *s)
       ^
  187. {
  188.     return url_fseek(s, 0, SEEK_CUR);

libavformat/aviobuf.c:188:5: Skipping url_fseek(): empty list of specs
  186. int64_t url_ftell(ByteIOContext *s)
  187. {
  188.     return url_fseek(s, 0, SEEK_CUR);
           ^
  189. }
  190. 

libavformat/aviobuf.c:189:1: return from a call to url_ftell
  187. {
  188.     return url_fseek(s, 0, SEEK_CUR);
  189. }
       ^
  190. 
  191. int64_t url_fsize(ByteIOContext *s)
