From 33766482249c17095545155bd08d206a6cbb1cc7 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 19 Mar 2015 09:37:25 +0300 Subject: [PATCH] ole32/datacache: Handle stream Stat() failure (PVS-Studio). --- dlls/ole32/datacache.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index 6ae936717b7..2aae5364d15 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -576,6 +576,11 @@ static HRESULT DataCacheEntry_LoadData(DataCacheEntry *cache_entry) hres = IStream_Stat(presStream, &streamInfo, STATFLAG_NONAME); + if (FAILED(hres)) + { + IStream_Release(presStream); + return hres; + } /* * Read the header.