From 5e4472d425b2efdcb94a197dd480b3a8a6f235fd Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Mon, 2 Sep 2019 23:49:43 +0200 Subject: [PATCH] wbemdisp: Handle NULL signatures in init_members. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47709 Signed-off-by: Piotr Caban Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/wbemdisp/locator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wbemdisp/locator.c b/dlls/wbemdisp/locator.c index 5e229890122..a9ef1618882 100644 --- a/dlls/wbemdisp/locator.c +++ b/dlls/wbemdisp/locator.c @@ -618,8 +618,8 @@ static HRESULT init_members( struct object *object ) { count++; SysFreeString( name ); - IWbemClassObject_Release( sig_in ); - IWbemClassObject_Release( sig_out ); + if (sig_in) IWbemClassObject_Release( sig_in ); + if (sig_out) IWbemClassObject_Release( sig_out ); } IWbemClassObject_EndMethodEnumeration( object->object ); } @@ -657,8 +657,8 @@ static HRESULT init_members( struct object *object ) IWbemClassObject_EndMethodEnumeration( object->object ); goto error; } - IWbemClassObject_Release( sig_in ); - IWbemClassObject_Release( sig_out ); + if (sig_in) IWbemClassObject_Release( sig_in ); + if (sig_out) IWbemClassObject_Release( sig_out ); TRACE( "added method %s\n", debugstr_w(name) ); } IWbemClassObject_EndMethodEnumeration( object->object );