From 01901ec45154282b6eb580337cfa8ebd587fc122 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 24 Aug 2014 12:19:00 -0700 Subject: [PATCH] Move buffer declaration outside the loop --- limelight-common/AudioStream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/limelight-common/AudioStream.c b/limelight-common/AudioStream.c index 3dedd1f..4f1bd85 100644 --- a/limelight-common/AudioStream.c +++ b/limelight-common/AudioStream.c @@ -71,10 +71,9 @@ static void UdpPingThreadProc(void *context) { static void ReceiveThreadProc(void* context) { int err; PRTP_PACKET rtp; + char* buffer = NULL; while (!PltIsThreadInterrupted(&receiveThread)) { - char* buffer = NULL; - if (buffer == NULL) { buffer = (char*) malloc(MAX_PACKET_SIZE + sizeof(int)); if (buffer == NULL) {