git://git.iain.cx/iain
/
nssm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63363fb
)
Don't leak memory reading REG_SZ values.
author
Iain Patterson
<me@iain.cx>
Thu, 3 Feb 2011 19:00:19 +0000
(19:00 +0000)
committer
Iain Patterson
<me@iain.cx>
Thu, 3 Feb 2011 19:00:19 +0000
(19:00 +0000)
registry.cpp
patch
|
blob
|
history
diff --git
a/registry.cpp
b/registry.cpp
index
cb0b3e6
..
0a74bd8
100644
(file)
--- 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 */
\r
if (type != REG_EXPAND_SZ) {
\r
memmove(data, buffer, buflen);
\r
+ HeapFree(GetProcessHeap(), 0, buffer);
\r
return 0;
\r
}
\r
\r