X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=registry.cpp;h=0a74bd8f9600d5dedc395716b39b18c94f3ec731;hb=e200c1086d1f9fbf85d40211d2284d29661c5277;hp=cb0b3e62ff8f861560e4ea223ce57b89faed454f;hpb=63363fbc93ec23e1673113029e819c1a55dd7967;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; }