diff options
author | Federico Tomassetti <f.tomassetti@gmail.com> | 2015-04-19 12:28:58 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-04-19 23:50:48 +0100 |
commit | 386e2755aab73ae7075f78d92786cb5c5419597a (patch) | |
tree | fcae747ab19e52a68e8038308a47512be5ced871 /libavdevice | |
parent | 617814b4a717b38add5ccb8dd200dbb655f98f09 (diff) | |
download | ffmpeg-386e2755aab73ae7075f78d92786cb5c5419597a.tar.gz |
jack: Check memory allocation
Bug-Id: CID 1265785
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/jack.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavdevice/jack.c b/libavdevice/jack.c index fc5caa8830..5d000a3cd0 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 */ |