From d614927a10835d47eb5bd0f4b1c2dbe4f4b3dbd2 Mon Sep 17 00:00:00 2001 From: Gijs Vermeulen Date: Tue, 26 Mar 2019 17:04:44 +0100 Subject: [PATCH] hnetcfg: Initialize INetFwRules::get__NewEnum out parameter. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46906 Signed-off-by: Gijs Vermeulen Signed-off-by: Alexandre Julliard (cherry picked from commit 16803516ef0967b1290bcdac269f4e157af163f1) Signed-off-by: Michael Stefaniuc --- dlls/hnetcfg/policy.c | 4 ++++ dlls/hnetcfg/tests/policy.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/dlls/hnetcfg/policy.c b/dlls/hnetcfg/policy.c index c2f32520bd4..c549ead3888 100644 --- a/dlls/hnetcfg/policy.c +++ b/dlls/hnetcfg/policy.c @@ -238,6 +238,10 @@ static HRESULT WINAPI netfw_rules_get__NewEnum( fw_rules *This = impl_from_INetFwRules( iface ); FIXME("%p, %p\n", This, newEnum); + + if (!newEnum) return E_POINTER; + *newEnum = NULL; + return E_NOTIMPL; } diff --git a/dlls/hnetcfg/tests/policy.c b/dlls/hnetcfg/tests/policy.c index 3fa8348b6e6..8701455841b 100644 --- a/dlls/hnetcfg/tests/policy.c +++ b/dlls/hnetcfg/tests/policy.c @@ -60,6 +60,9 @@ static void test_policy2_rules(INetFwPolicy2 *policy2) INetFwServiceRestriction_Release(restriction); } + hr = INetFwRules_get__NewEnum(rules, NULL); + ok(hr == E_POINTER, "got %08x\n", hr); + INetFwRules_Release(rules); INetFwRules_Release(rules2); }