mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 02:00:12 +01:00
st/nine: Fix leak after ctor failures
Previously ctor failures would not unreference the device. Signed-off-by: Axel Davy <axel.davy@ens.fr>
This commit is contained in:
parent
7fc8391d23
commit
2d51c817cd
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue