projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4873031
)
cso: possible null pointer dereference
author
Zack Rusin
<zack@kde.org>
Sun, 21 Jun 2009 01:25:47 +0000
(21:25 -0400)
committer
Zack Rusin
<zack@kde.org>
Mon, 6 Jul 2009 21:21:37 +0000
(17:21 -0400)
reported by clang static analyzer
src/gallium/auxiliary/cso_cache/cso_cache.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/cso_cache/cso_cache.c
b/src/gallium/auxiliary/cso_cache/cso_cache.c
index 0bc77a572879c12a1602d2ffca689b64f90e47be..e6dce3f0e5bc07fa81c8de4be2c019e410209844 100644
(file)
--- a/
src/gallium/auxiliary/cso_cache/cso_cache.c
+++ b/
src/gallium/auxiliary/cso_cache/cso_cache.c
@@
-361,6
+361,10
@@
void cso_for_each_state(struct cso_cache *sc, enum cso_cache_type type,
void cso_cache_delete(struct cso_cache *sc)
{
assert(sc);
+
+ if (!sc)
+ return;
+
/* delete driver data */
cso_for_each_state(sc, CSO_BLEND, delete_blend_state, 0);
cso_for_each_state(sc, CSO_DEPTH_STENCIL_ALPHA, delete_depth_stencil_state, 0);