From eb46ce54a843e4ba13e97c4cfea83bcdc693684b Mon Sep 17 00:00:00 2001 From: Greg Kaiser Date: Mon, 28 Mar 2016 16:01:04 -0700 Subject: [PATCH] accessorytest: Remove bad code This code was calling 'free' on uninitialized stack memory. However, we never reached this code due to the while(1) loop, so we weren't experiencing bad behavior. Still, we remove this code to avoid the temptation of copy/paste for someone in the future who might leave this loop. Change-Id: I7f4d9528ddc2f92f3118ec1ade630f98bfbacd0c --- libs/usb/tests/accessorytest/audio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libs/usb/tests/accessorytest/audio.c b/libs/usb/tests/accessorytest/audio.c index d23d9b3fa5d3d..36ee6b81839ca 100644 --- a/libs/usb/tests/accessorytest/audio.c +++ b/libs/usb/tests/accessorytest/audio.c @@ -164,7 +164,6 @@ static void* capture_thread(void* arg) static void* play_thread(void* arg) { struct pcm *pcm = arg; - char *buffer; int index, err; fprintf(stderr, "play_thread start\n"); @@ -181,7 +180,6 @@ static void* play_thread(void* arg) fprintf(stderr, "play_thread done\n"); pcm_close(pcm); - free(buffer); return NULL; }