Janitorial: Remove redundant NULL checks before calling HeapFree
wrappers.
Michael Stefaniuc
mstefani at redhat.de
Sat Oct 14 18:03:58 CDT 2006
---
dlls/rpcrt4/rpc_message.c | 6 ++----
dlls/winedos/module.c | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c
index fb6187f..0120bf6 100644
--- a/dlls/rpcrt4/rpc_message.c
+++ b/dlls/rpcrt4/rpc_message.c
@@ -595,7 +595,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection
status = RPC_S_OK;
fail:
- if (status != RPC_S_OK && *Header) {
+ if (status != RPC_S_OK) {
RPCRT4_FreeHeader(*Header);
*Header = NULL;
}
@@ -765,9 +765,7 @@ RPC_STATUS WINAPI I_RpcReceive(PRPC_MESS
status = RPC_S_OK;
fail:
- if (hdr) {
- RPCRT4_FreeHeader(hdr);
- }
+ RPCRT4_FreeHeader(hdr);
RPCRT4_CloseBinding(bind, conn);
return status;
}
diff --git a/dlls/winedos/module.c b/dlls/winedos/module.c
index e00b77e..24d6a73 100644
--- a/dlls/winedos/module.c
+++ b/dlls/winedos/module.c
@@ -273,7 +273,7 @@ static BOOL MZ_DoLoadImage( HANDLE hFile
env_seg = par_env_seg;
else
env_seg=MZ_InitEnvironment(oldenv, filename);
- if( alloc && oldenv)
+ if (alloc)
FreeEnvironmentStringsA( oldenv);
/* allocate memory for the executable */
--
1.4.2.3
--
Michael Stefaniuc Tel.: +49-711-96437-199
Sr. Network Engineer Fax.: +49-711-96437-111
Red Hat GmbH Email: mstefani at redhat.com
Hauptstaetterstr. 58 http://www.redhat.de/
D-70178 Stuttgart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061015/a6a60e60/attachment.pgp
More information about the wine-patches
mailing list