[PATCH] oledb32: free memory on error exit (Coverity)

Marcus Meissner marcus at jet.franken.de
Sat Jun 13 02:21:06 CDT 2015


966609 Resource leak

use correct free function
---
 dlls/oledb32/datainit.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/oledb32/datainit.c b/dlls/oledb32/datainit.c
index 3c5293a..3a76e0b 100644
--- a/dlls/oledb32/datainit.c
+++ b/dlls/oledb32/datainit.c
@@ -520,6 +520,8 @@ static HRESULT get_dbpropset_from_proplist(struct dbprops *props, DBPROPSET **pr
         if (FAILED(hr))
         {
             ERR("failed to init property %s value as type %d\n", debugstr_w(pair->name), descr->type);
+            free_dbpropset(1, *propset);
+            *propset = NULL;
             return hr;
         }
 
-- 
1.8.4.5




More information about the wine-patches mailing list