[FFmpeg-cvslog] jack: Check memory allocation

Federico Tomassetti git at videolan.org
Mon Apr 20 12:59:49 CEST 2015


ffmpeg | branch: master | Federico Tomassetti <f.tomassetti at gmail.com> | Sun Apr 19 12:28:58 2015 +0100| [386e2755aab73ae7075f78d92786cb5c5419597a] | committer: Vittorio Giovara

jack: Check memory allocation

Bug-Id: CID 1265785
Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=386e2755aab73ae7075f78d92786cb5c5419597a
---

 libavdevice/jack.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavdevice/jack.c b/libavdevice/jack.c
index fc5caa8..5d000a3 100644
--- a/libavdevice/jack.c
+++ b/libavdevice/jack.c
@@ -165,6 +165,8 @@ static int start_jack(AVFormatContext *context)
 
     self->sample_rate = jack_get_sample_rate(self->client);
     self->ports       = av_malloc(self->nports * sizeof(*self->ports));
+    if (!self->ports)
+        return AVERROR(ENOMEM);
     self->buffer_size = jack_get_buffer_size(self->client);
 
     /* Register JACK ports */



More information about the ffmpeg-cvslog mailing list