]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
die() on failure to create ringbuffer.
authorJörn Nettingsmeier <nettings@luchtbeweging.nl>
Thu, 14 Feb 2019 15:45:57 +0000 (15:45 +0000)
committerJörn Nettingsmeier <nettings@luchtbeweging.nl>
Thu, 14 Feb 2019 15:45:57 +0000 (15:45 +0000)
audio_jack.c

index 91abbe4b11e43b9f5eba3923e2680be06a170081..88bec8323513ca725feaf686ce3a62a1657fb7dd 100644 (file)
@@ -361,6 +361,8 @@ int jack_init(__attribute__((unused)) int argc, __attribute__((unused)) char **a
     config.jack_right_channel_name = strdup("right");
 
   jackbuf = jack_ringbuffer_create(buffer_size); // make the jack ringbuffer the same size as audio_lmb
+  if (jackbuf == NULL)
+    die("Can't allocate %d bytes for the JACK ringbuffer.", buffer_size);
   jack_ringbuffer_mlock(jackbuf);               // lock buffer into memory so that it never gets paged out
 
   jack_set_error_function(default_jack_error_callback);