projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc6c80e
)
st/nine: Prevent possible crash
author
Patrick Rudolph
<siro@das-labor.org>
Sat, 16 May 2015 17:47:00 +0000
(19:47 +0200)
committer
Axel Davy
<axel.davy@ens.fr>
Fri, 21 Aug 2015 20:21:46 +0000
(22:21 +0200)
In case NineBaseTexture9_ctor returns an error
This->surfaces[l] might be NULL.
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
src/gallium/state_trackers/nine/texture9.c
patch
|
blob
|
history
diff --git
a/src/gallium/state_trackers/nine/texture9.c
b/src/gallium/state_trackers/nine/texture9.c
index af97082df8dbbd7ac4f333cbd405cd39e34d8dd5..bc325c1335e61455a40da289e7a89666ad2924fa 100644
(file)
--- a/
src/gallium/state_trackers/nine/texture9.c
+++ b/
src/gallium/state_trackers/nine/texture9.c
@@
-229,7
+229,8
@@
NineTexture9_dtor( struct NineTexture9 *This )
if (This->surfaces) {
/* The surfaces should have 0 references and be unbound now. */
for (l = 0; l <= This->base.base.info.last_level; ++l)
- NineUnknown_Destroy(&This->surfaces[l]->base.base);
+ if (This->surfaces[l])
+ NineUnknown_Destroy(&This->surfaces[l]->base.base);
FREE(This->surfaces);
}