1
0
Fork 0
forked from len0rd/rockbox

recording: Fix sloppy return value check. This caused an OOM panic.

Change-Id: I30bbc5623d81ad7cbbee52a439fb5909af2761b7
This commit is contained in:
Thomas Martitz 2013-12-24 10:20:13 +01:00
parent 5827e41904
commit a56837b46d

View file

@ -1416,7 +1416,7 @@ static void on_init_recording(void)
static struct buflib_callbacks dummy_ops;
talk_buffer_set_policy(TALK_BUFFER_LOOSE);
pcmrec_handle = core_alloc_maximum("pcmrec", &rec_buffer_size, &dummy_ops);
if (pcmrec_handle)
if (pcmrec_handle <= 0)
/* someone is abusing core_alloc_maximum(). Fix this evil guy instead of
* trying to handle OOM without hope */
panicf("%s(): OOM\n", __func__);