Nikolay Sivov : msi: Fix potential NULL pointer dereference in ILockBytes_Release (Coverity).
Alexandre Julliard
julliard at winehq.org
Mon Jan 26 10:14:48 CST 2009
Module: wine
Branch: master
Commit: 2fbe8d23eb2070472d75037ac8024bd9e2509bfb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2fbe8d23eb2070472d75037ac8024bd9e2509bfb
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Sat Jan 24 18:47:33 2009 +0300
msi: Fix potential NULL pointer dereference in ILockBytes_Release (Coverity).
---
dlls/msi/storages.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/storages.c b/dlls/msi/storages.c
index 2e21cb8..302906b 100644
--- a/dlls/msi/storages.c
+++ b/dlls/msi/storages.c
@@ -134,7 +134,7 @@ static UINT STORAGES_get_row( struct tagMSIVIEW *view, UINT row, MSIRECORD **rec
static HRESULT stream_to_storage(IStream *stm, IStorage **stg)
{
- ILockBytes *lockbytes;
+ ILockBytes *lockbytes = NULL;
STATSTG stat;
LPVOID data;
HRESULT hr;
@@ -177,7 +177,7 @@ static HRESULT stream_to_storage(IStream *stm, IStorage **stg)
done:
msi_free(data);
- ILockBytes_Release(lockbytes);
+ if (lockbytes) ILockBytes_Release(lockbytes);
return hr;
}
More information about the wine-cvs
mailing list