projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cc8192
)
st/nine: Fix volumetexture dtor on ctor failure
author
Axel Davy
<davyaxel0@gmail.com>
Sun, 25 Nov 2018 13:37:53 +0000
(14:37 +0100)
committer
Axel Davy
<davyaxel0@gmail.com>
Sun, 23 Dec 2018 07:14:50 +0000
(08:14 +0100)
The dtor is called on allocation failure,
thus we must check the volumes are allocated
before trying to release them.
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/state_trackers/nine/volumetexture9.c
patch
|
blob
|
history
diff --git
a/src/gallium/state_trackers/nine/volumetexture9.c
b/src/gallium/state_trackers/nine/volumetexture9.c
index 5dec484486435cc2fed7131104f35d241c30dae0..c7191bce68853567cff0b06ad7002a3afef2c8cd 100644
(file)
--- a/
src/gallium/state_trackers/nine/volumetexture9.c
+++ b/
src/gallium/state_trackers/nine/volumetexture9.c
@@
-141,7
+141,8
@@
NineVolumeTexture9_dtor( struct NineVolumeTexture9 *This )
if (This->volumes) {
for (l = 0; l <= This->base.base.info.last_level; ++l)
- NineUnknown_Destroy(&This->volumes[l]->base);
+ if (This->volumes[l])
+ NineUnknown_Destroy(&This->volumes[l]->base);
FREE(This->volumes);
}