X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=registry.cpp;h=0a74bd8f9600d5dedc395716b39b18c94f3ec731;hb=494e69560d82ff9d768b4f87a16b4c1ac9eb05c0;hp=cb0b3e62ff8f861560e4ea223ce57b89faed454f;hpb=6ee4bf0c79840175fea1a8035c9ef4ce6749d779;p=nssm.git diff --git a/registry.cpp b/registry.cpp index cb0b3e6..0a74bd8 100644 --- a/registry.cpp +++ b/registry.cpp @@ -124,6 +124,7 @@ int expand_parameter(HKEY key, char *value, char *data, unsigned long datalen) { /* Technically we shouldn't expand environment strings from REG_SZ values */ if (type != REG_EXPAND_SZ) { memmove(data, buffer, buflen); + HeapFree(GetProcessHeap(), 0, buffer); return 0; }