projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
I'm sick of all those #ifdefs in settings.c, and in any case plink
[u/mdw/putty]
/
winstore.c
diff --git
a/winstore.c
b/winstore.c
index
d480079
..
bc7bb5b
100644
(file)
--- a/
winstore.c
+++ b/
winstore.c
@@
-198,14
+198,14
@@
char *enum_settings_next(void *handle, char *buffer, int buflen)
struct enumsettings *e = (struct enumsettings *) handle;
char *otherbuf;
otherbuf = smalloc(3 * buflen);
struct enumsettings *e = (struct enumsettings *) handle;
char *otherbuf;
otherbuf = smalloc(3 * buflen);
- if (otherbuf && RegEnumKey(e->key, e->i++, otherbuf,
- 3 * buflen) == ERROR_SUCCESS) {
+ if (RegEnumKey(e->key, e->i++, otherbuf, 3 * buflen) == ERROR_SUCCESS) {
unmungestr(otherbuf, buffer, buflen);
sfree(otherbuf);
return buffer;
unmungestr(otherbuf, buffer, buflen);
sfree(otherbuf);
return buffer;
- } else
+ } else {
+ sfree(otherbuf);
return NULL;
return NULL;
-
+ }
}
void enum_settings_finish(void *handle)
}
void enum_settings_finish(void *handle)