summaryrefslogtreecommitdiffstats
path: root/apps/recorder
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2013-12-24 10:20:13 +0100
committerThomas Martitz <kugel@rockbox.org>2013-12-24 10:20:13 +0100
commita56837b46d1b9cce46a83a2acf3a237abffcf629 (patch)
tree6f101583e10f19b71a0c5adce393a354d8557adf /apps/recorder
parent5827e41904b2e3de7d5b7e53a8e55f35197e1add (diff)
downloadrockbox-a56837b46d1b9cce46a83a2acf3a237abffcf629.tar.gz
rockbox-a56837b46d1b9cce46a83a2acf3a237abffcf629.tar.bz2
rockbox-a56837b46d1b9cce46a83a2acf3a237abffcf629.zip
recording: Fix sloppy return value check. This caused an OOM panic.
Change-Id: I30bbc5623d81ad7cbbee52a439fb5909af2761b7
Diffstat (limited to 'apps/recorder')
-rw-r--r--apps/recorder/pcm_record.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c
index 799c733948..b5de670c0d 100644
--- a/apps/recorder/pcm_record.c
+++ b/apps/recorder/pcm_record.c
@@ -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__);