Gijs Vermeulen : hnetcfg: Initialize INetFwRules:: get__NewEnum out parameter.

Alexandre Julliard julliard at winehq.org
Tue Mar 26 16:43:15 CDT 2019


Module: wine
Branch: master
Commit: 16803516ef0967b1290bcdac269f4e157af163f1
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=16803516ef0967b1290bcdac269f4e157af163f1

Author: Gijs Vermeulen <gijsvrm at gmail.com>
Date:   Tue Mar 26 17:04:44 2019 +0100

hnetcfg: Initialize INetFwRules::get__NewEnum out parameter.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46906
Signed-off-by: Gijs Vermeulen <gijsvrm at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 53f39ae..26b7cc1 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 3fa8348..8701455 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);
 }




More information about the wine-cvs mailing list