From 890b5dafb6901923c254e189d8539d4653cb1ab7 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 5 Jun 2009 14:02:36 +0200 Subject: [PATCH] msi: Check the correct pointers for allocation failure (Coverity). --- dlls/msi/database.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msi/database.c b/dlls/msi/database.c index 80a2c5d05be..bc9319e33db 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -1371,7 +1371,7 @@ static UINT msi_get_table_labels(MSIDATABASE *db, LPCWSTR table, LPWSTR **labels count = MSI_RecordGetFieldCount(prec); *numlabels = count + 1; *labels = msi_alloc((*numlabels)*sizeof(LPWSTR)); - if (!labels) + if (!*labels) { r = ERROR_OUTOFMEMORY; goto end; @@ -1399,7 +1399,7 @@ static UINT msi_get_query_columns(MSIQUERY *query, LPWSTR **columns, DWORD *numc count = MSI_RecordGetFieldCount(prec); *columns = msi_alloc(count*sizeof(LPWSTR)); - if (!columns) + if (!*columns) { r = ERROR_OUTOFMEMORY; goto end; @@ -1428,7 +1428,7 @@ static UINT msi_get_query_types(MSIQUERY *query, LPWSTR **types, DWORD *numtypes count = MSI_RecordGetFieldCount(prec); *types = msi_alloc(count*sizeof(LPWSTR)); - if (!types) + if (!*types) { r = ERROR_OUTOFMEMORY; goto end;