Commit 57d10a28 authored by Reimar Döffinger's avatar Reimar Döffinger

pulseaudio: move NULL check up before dereference.

Fixes CID 1197068.
Signed-off-by: 's avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
parent fc7e02f0
...@@ -148,10 +148,10 @@ int ff_pulse_audio_get_devices(AVDeviceInfoList *devices, const char *server, in ...@@ -148,10 +148,10 @@ int ff_pulse_audio_get_devices(AVDeviceInfoList *devices, const char *server, in
dev_list.output = output; dev_list.output = output;
dev_list.devices = devices; dev_list.devices = devices;
devices->nb_devices = 0;
devices->devices = NULL;
if (!devices) if (!devices)
return AVERROR(EINVAL); return AVERROR(EINVAL);
devices->nb_devices = 0;
devices->devices = NULL;
if (!(pa_ml = pa_mainloop_new())) if (!(pa_ml = pa_mainloop_new()))
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
if (!(pa_mlapi = pa_mainloop_get_api(pa_ml))) { if (!(pa_mlapi = pa_mainloop_get_api(pa_ml))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment