From: Iain Patterson Date: Mon, 30 Dec 2013 11:20:07 +0000 (+0000) Subject: Remember to free info after QueryServiceConfig2(). X-Git-Tag: v2.22~102 X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=b3ffb297ad1e4a2eb1142789519f463c6a464b7d;p=nssm.git Remember to free info after QueryServiceConfig2(). We weren't freeing the SERVICE_CONFIG_DELAYED_AUTO_START_INFO buffer after checking for delayed auto start. --- diff --git a/service.cpp b/service.cpp index eec2261..abe745a 100644 --- a/service.cpp +++ b/service.cpp @@ -386,6 +386,7 @@ int pre_edit_service(int argc, TCHAR **argv) { if (QueryServiceConfig2(service->handle, SERVICE_CONFIG_DELAYED_AUTO_START_INFO, (unsigned char *) info, bufsize, &bufsize)) { if (info->fDelayedAutostart) service->startup = NSSM_STARTUP_DELAYED; + HeapFree(GetProcessHeap(), 0, info); } else { error = GetLastError();