cell: Don't free NULL code pointers
authorIan Romanick <idr@us.ibm.com>
Mon, 17 Mar 2008 23:07:54 +0000 (16:07 -0700)
committerIan Romanick <idr@us.ibm.com>
Mon, 17 Mar 2008 23:07:54 +0000 (16:07 -0700)
src/gallium/auxiliary/rtasm/rtasm_ppc_spe.c

index 842d713f8412b77b908db8bd1b40e9b66dd81ec5..24be65bff9dd4bf35665a8ebf25d1d6e3912e90f 100644 (file)
@@ -316,7 +316,9 @@ void spe_init_func(struct spe_function *p, unsigned code_size)
 
 void spe_release_func(struct spe_function *p)
 {
-    align_free(p->store);
+    if (p->store != NULL) {
+        align_free(p->store);
+    }
     p->store = NULL;
     p->csr = NULL;
 }