osx_write.c: Use realloc() instead of free() and malloc()
authorAndre Noll <maan@congo.fml.local>
Wed, 23 Aug 2006 10:26:18 +0000 (12:26 +0200)
committerAndre Noll <maan@congo.fml.local>
Wed, 23 Aug 2006 10:26:18 +0000 (12:26 +0200)
Also, kill a silly comment.

osx_write.c

index 885c05d..39af500 100644 (file)
@@ -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;