[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XENCONS PATCH 10/11] monitor: Fix GetExecutable allocation check
The wrong pointer was tested. Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx> --- src/monitor/monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index cefc3c2..772bbf4 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -663,6 +663,7 @@ fail1: return 1; } +_Success_(return != FALSE) static BOOL GetExecutable( _In_ PSTR DeviceName, @@ -706,7 +707,7 @@ GetExecutable( ExecutableLength = MaxValueLength; *Executable = calloc(1, ExecutableLength); - if (Executable == NULL) + if (*Executable == NULL) goto fail3; Error = RegQueryValueExA(Key, -- 2.51.0.windows.1 -- Ngoc Tu Dinh | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |