Merge commit '386e2755aab73ae7075f78d92786cb5c5419597a'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 20 Apr 2015 10:46:29 +0000 (12:46 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 20 Apr 2015 10:46:29 +0000 (12:46 +0200)
* commit '386e2755aab73ae7075f78d92786cb5c5419597a':
  jack: Check memory allocation

Conflicts:
libavdevice/jack.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavdevice/jack.c

@@@ -164,7 -164,9 +164,9 @@@ static int start_jack(AVFormatContext *
      sem_init(&self->packet_count, 0, 0);
  
      self->sample_rate = jack_get_sample_rate(self->client);
 -    self->ports       = av_malloc(self->nports * sizeof(*self->ports));
 +    self->ports       = av_malloc_array(self->nports, sizeof(*self->ports));
+     if (!self->ports)
+         return AVERROR(ENOMEM);
      self->buffer_size = jack_get_buffer_size(self->client);
  
      /* Register JACK ports */