commit | 4edca3cf4d52e40b45e829bd817c98be5bd1831a | [log] [tgz] |
---|---|---|
author | Rob Shearman <rob@codeweavers.com> | Mon Nov 12 20:10:32 2007 +0000 |
committer | Alexandre Julliard <julliard@winehq.org> | Tue Nov 13 13:29:30 2007 +0100 |
tree | bf8e1ce3c9f52544496c52f7838f05b963463ba9 | |
parent | 8296548bb51d27991960c3c79778e9570f7224c5 [diff] [blame] |
ole32: Fail before constructing an object in CreateStreamOnHGlobal to avoid a memory leak.
diff --git a/dlls/ole32/hglobalstream.c b/dlls/ole32/hglobalstream.c index e6d2f73..2175214 100644 --- a/dlls/ole32/hglobalstream.c +++ b/dlls/ole32/hglobalstream.c
@@ -721,6 +721,9 @@ { HGLOBALStreamImpl* newStream; + if (!ppstm) + return E_INVALIDARG; + newStream = HGLOBALStreamImpl_Construct(hGlobal, fDeleteOnRelease);