Module: wine
Branch: master
Commit: 614afcefa33c727f31d566c3d7ee05d74afc363f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=614afcefa33c727f31d566c3d…
Author: Piotr Caban <piotr(a)codeweavers.com>
Date: Mon Sep 7 18:45:10 2015 +0200
rpcrt4: Free server side arguments with MustFree flag first so other arguments may be used to determine its size.
This also fixes a leak when both MustFree and ServerAllocSize flags are
specified.
---
dlls/rpcrt4/ndr_stubless.c | 7 +++++--
dlls/rpcrt4/ndr_stubless.h | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c
index 033c650..f5a6bab 100644
--- a/dlls/rpcrt4/ndr_stubless.c
+++ b/dlls/rpcrt4/ndr_stubless.c
@@ -1161,12 +1161,14 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg,
if (params[i].attr.IsOut || params[i].attr.IsReturn)
call_marshaller(pStubMsg, pArg, ¶ms[i]);
break;
- case STUBLESS_FREE:
+ case STUBLESS_MUSTFREE:
if (params[i].attr.MustFree)
{
call_freer(pStubMsg, pArg, ¶ms[i]);
}
- else if (params[i].attr.ServerAllocSize)
+ break;
+ case STUBLESS_FREE:
+ if (params[i].attr.ServerAllocSize)
{
HeapFree(GetProcessHeap(), 0, *(void **)pArg);
}
@@ -1455,6 +1457,7 @@ LONG WINAPI NdrStubCall2(
case STUBLESS_INITOUT:
case STUBLESS_CALCSIZE:
case STUBLESS_MARSHAL:
+ case STUBLESS_MUSTFREE:
case STUBLESS_FREE:
retval_ptr = stub_do_args(&stubMsg, pFormat, phase, number_of_params);
break;
diff --git a/dlls/rpcrt4/ndr_stubless.h b/dlls/rpcrt4/ndr_stubless.h
index 5b0add0..2e7beba 100644
--- a/dlls/rpcrt4/ndr_stubless.h
+++ b/dlls/rpcrt4/ndr_stubless.h
@@ -234,6 +234,7 @@ enum stubless_phase
STUBLESS_CALCSIZE,
STUBLESS_GETBUFFER,
STUBLESS_MARSHAL,
+ STUBLESS_MUSTFREE,
STUBLESS_FREE
};
Module: wine
Branch: master
Commit: 07cc9a34a87cd08c87ae198e4aeb8c9bb7f55175
URL: http://source.winehq.org/git/wine.git/?a=commit;h=07cc9a34a87cd08c87ae198e4…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com>
Date: Mon Sep 7 20:38:04 2015 +1000
regsvr32: Process the next file in the array if an error occurs.
The Windows version stops processing the current file and moves to the
next file on the first error.
---
programs/regsvr32/regsvr32.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/programs/regsvr32/regsvr32.c b/programs/regsvr32/regsvr32.c
index ff6a3ae..a1b55a3 100644
--- a/programs/regsvr32/regsvr32.c
+++ b/programs/regsvr32/regsvr32.c
@@ -292,8 +292,9 @@ int wmain(int argc, WCHAR* argv[])
if (CallInstall && Unregister)
res = InstallDll(!Unregister, DllName, wsCommandLine);
+ /* The Windows version stops processing the current file on the first error. */
if (res)
- return res;
+ continue;
if (!CallInstall || (CallInstall && CallRegister))
{
@@ -304,14 +305,13 @@ int wmain(int argc, WCHAR* argv[])
}
if (res)
- return res;
- /* Confirmed. The Windows version stops on the first error. */
+ continue;
if (CallInstall && !Unregister)
res = InstallDll(!Unregister, DllName, wsCommandLine);
if (res)
- return res;
+ continue;
}
}