From 05e39ec51362d9c23f0652a4ac5017a1b6489e49 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 30 Oct 2015 15:51:26 +0100 Subject: stream/audio: fix unchecked strdups See #2435. It's literally a waste of time trying to fix minor memory leaks in this old, unused, and crappy code. --- stream/ai_sndio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'stream/ai_sndio.c') diff --git a/stream/ai_sndio.c b/stream/ai_sndio.c index 2bb47955a4..10e95cea62 100644 --- a/stream/ai_sndio.c +++ b/stream/ai_sndio.c @@ -38,7 +38,10 @@ int ai_sndio_init(audio_in_t *ai) { int err; - if ((ai->sndio.hdl = sio_open(ai->sndio.device, SIO_REC, 0)) == NULL) { + const char *device = ai->sndio.device; + if (!device) + device = "default"; + if ((ai->sndio.hdl = sio_open(device, SIO_REC, 0)) == NULL) { MP_ERR(ai, "could not open sndio audio"); return -1; } -- cgit v1.2.3