From f39c27735eab6c98ff84a90f53ed7cf311c9b664 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 23 Aug 2006 12:26:18 +0200 Subject: [PATCH] osx_write.c: Use realloc() instead of free() and malloc() Also, kill a silly comment. --- osx_write.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/osx_write.c b/osx_write.c index 885c05d1..39af5000 100644 --- a/osx_write.c +++ b/osx_write.c @@ -105,12 +105,7 @@ static void fill_buffer(osx_buffer *b, short *source, long size) return; PARA_INFO_LOG("%ld\n", size); if (b->size != size) { - /* - * Hey! What's that? Coudn't this buffer size be fixed - * once (well, perhaps we just didn't allocate it yet) - */ - free(b->buffer); - b->buffer = malloc(size * sizeof(float)); + b->buffer = para_realloc(b->buffer, size * sizeof(float)); b->size = size; } dest = b->buffer; -- 2.30.2