From: Andre Noll Date: Wed, 23 Aug 2006 10:26:18 +0000 (+0200) Subject: osx_write.c: Use realloc() instead of free() and malloc() X-Git-Tag: v0.2.14~34 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=f39c27735eab6c98ff84a90f53ed7cf311c9b664 osx_write.c: Use realloc() instead of free() and malloc() Also, kill a silly comment. --- 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;