From 9415d45a808eb0d35380b22430b892cb9291c0f8 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Wed, 21 Oct 2020 11:47:12 +0200 Subject: [PATCH] msado15: Use correct string type for default provider. Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/msado15/connection.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/msado15/connection.c b/dlls/msado15/connection.c index 2773850236d..e3222e63b6a 100644 --- a/dlls/msado15/connection.c +++ b/dlls/msado15/connection.c @@ -681,7 +681,11 @@ HRESULT Connection_create( void **obj ) connection->state = adStateClosed; connection->timeout = 30; connection->datasource = NULL; - connection->provider = SysAllocString(L"MSDASQL"); + if (!(connection->provider = strdupW( L"MSDASQL" ))) + { + heap_free( connection ); + return E_OUTOFMEMORY; + } connection->mode = adModeUnknown; connection->location = adUseServer;