projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fc8391
)
st/nine: Fix leak after ctor failures
author
Axel Davy
<axel.davy@ens.fr>
Fri, 12 Feb 2016 18:08:42 +0000
(19:08 +0100)
committer
Axel Davy
<axel.davy@ens.fr>
Wed, 18 May 2016 21:37:14 +0000
(23:37 +0200)
Previously ctor failures would not unreference
the device.
Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/iunknown.c
patch
|
blob
|
history
diff --git
a/src/gallium/state_trackers/nine/iunknown.c
b/src/gallium/state_trackers/nine/iunknown.c
index a28c8b2de8b6e78fb58a3d029afe373032106d11..515ceaa263f38ad4f1de6d6fd9c60c510bcbfebd 100644
(file)
--- a/
src/gallium/state_trackers/nine/iunknown.c
+++ b/
src/gallium/state_trackers/nine/iunknown.c
@@
-48,6
+48,8
@@
NineUnknown_ctor( struct NineUnknown *This,
void
NineUnknown_dtor( struct NineUnknown *This )
{
+ if (This->refs && This->device) /* Possible only if early exit after a ctor failed */
+ (void) NineUnknown_Release(NineUnknown(This->device));
FREE(This);
}