aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texcompress_s3tc.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-09-03 08:12:04 -0600
committerBrian Paul <[email protected]>2012-09-03 18:07:41 -0600
commit2ffc7fd2d2cbb1e895ceb8afd12e7c4a2dc3050f (patch)
tree6659861b546419a1d206e6d30c1d2e7f9f0ca5cb /src/mesa/main/texcompress_s3tc.c
parent2276bb991ac091b2b42274c2a094ba6f1de08468 (diff)
mesa: remove more null pointer checks before free() calls
Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/main/texcompress_s3tc.c')
-rw-r--r--src/mesa/main/texcompress_s3tc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index 230242c56b2..8736e208fde 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -203,8 +203,7 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS)
_mesa_warning(ctx, "external dxt library not available: texstore_rgb_dxt1");
}
- if (tempImage)
- free((void *) tempImage);
+ free((void *) tempImage);
return GL_TRUE;
}
@@ -256,8 +255,7 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS)
_mesa_warning(ctx, "external dxt library not available: texstore_rgba_dxt1");
}
- if (tempImage)
- free((void*) tempImage);
+ free((void*) tempImage);
return GL_TRUE;
}
@@ -308,8 +306,7 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS)
_mesa_warning(ctx, "external dxt library not available: texstore_rgba_dxt3");
}
- if (tempImage)
- free((void *) tempImage);
+ free((void *) tempImage);
return GL_TRUE;
}
@@ -360,8 +357,7 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
_mesa_warning(ctx, "external dxt library not available: texstore_rgba_dxt5");
}
- if (tempImage)
- free((void *) tempImage);
+ free((void *) tempImage);
return GL_TRUE;
}