Mesa (master): tgsi: Use FREE() to release MALLOC-ed() memories in sanity.

Michał Król michal at kemper.freedesktop.org
Tue Jan 5 08:29:34 UTC 2010


Module: Mesa
Branch: master
Commit: 55b5c8816e95528cbe68599bade44796e10711cd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=55b5c8816e95528cbe68599bade44796e10711cd

Author: Michal Krol <michal at vmware.com>
Date:   Tue Jan  5 09:09:50 2010 +0100

tgsi: Use FREE() to release MALLOC-ed() memories in sanity.

---

 src/gallium/auxiliary/tgsi/tgsi_sanity.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
index e4bd1b7..9b06444 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
@@ -247,7 +247,7 @@ check_register_usage(
    boolean indirect_access )
 {
    if (!check_file_name( ctx, reg->file )) {
-      free(reg);
+      FREE(reg);
       return FALSE;
    }
 
@@ -261,7 +261,7 @@ check_register_usage(
       if (!is_ind_register_used(ctx, reg))
          cso_hash_insert(ctx->regs_ind_used, reg->file, reg);
       else
-         free(reg);
+         FREE(reg);
    }
    else {
       if (!is_register_declared( ctx, reg )) {
@@ -275,7 +275,7 @@ check_register_usage(
       if (!is_register_used( ctx, reg ))
          cso_hash_insert(ctx->regs_used, scan_register_key(reg), reg);
       else
-         free(reg);
+         FREE(reg);
    }
    return TRUE;
 }
@@ -513,7 +513,7 @@ regs_hash_destroy(struct cso_hash *hash)
    while (!cso_hash_iter_is_null(iter)) {
       scan_register *reg = (scan_register *)cso_hash_iter_data(iter);
       iter = cso_hash_erase(hash, iter);
-      free(reg);
+      FREE(reg);
    }
    cso_hash_delete(hash);
 }




More information about the mesa-commit mailing list