softpipe: Use memory allocation macros.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 25 Sep 2011 10:46:49 +0000 (11:46 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 25 Sep 2011 11:18:55 +0000 (12:18 +0100)
Fixes segfault with memory debugging on.

src/gallium/drivers/softpipe/sp_state_shader.c
src/gallium/drivers/softpipe/sp_tex_sample.c

index da89527..d7d0599 100644 (file)
@@ -93,8 +93,8 @@ create_fs_variant(struct softpipe_context *softpipe,
    }
 
    if (stipple_fs) {
-      free((void *) stipple_fs->tokens);
-      free(stipple_fs);
+      FREE((void *) stipple_fs->tokens);
+      FREE(stipple_fs);
    }
 
    return var;
index dd33a10..2e91a70 100644 (file)
@@ -1722,7 +1722,7 @@ create_filter_table(void)
 {
    unsigned i;
    if (!weightLut) {
-      weightLut = (float *) malloc(WEIGHT_LUT_SIZE * sizeof(float));
+      weightLut = (float *) MALLOC(WEIGHT_LUT_SIZE * sizeof(float));
 
       for (i = 0; i < WEIGHT_LUT_SIZE; ++i) {
          float alpha = 2;