chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
42f738c
)
Zero out configuration strings when they are freed.
author
Richard Kettlewell
<rjk@greenend.org.uk>
Sat, 14 Mar 2009 19:00:52 +0000
(19:00 +0000)
committer
Richard Kettlewell
<rjk@greenend.org.uk>
Sat, 14 Mar 2009 19:00:52 +0000
(19:00 +0000)
This means that aliased configuration items aren't double-freed.
lib/configuration.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/configuration.c
b/lib/configuration.c
index 035e81443744a75bec914b85116eeab25a84a836..958ea6cb3633f051cba67b86b9229ef259fcf33e 100644
(file)
--- a/
lib/configuration.c
+++ b/
lib/configuration.c
@@
-498,6
+498,7
@@
static void free_none(struct config attribute((unused)) *c,
static void free_string(struct config *c,
const struct conf *whoami) {
xfree(VALUE(c, char *));
static void free_string(struct config *c,
const struct conf *whoami) {
xfree(VALUE(c, char *));
+ VALUE(c, char *) = 0;
}
static void free_stringlist(struct config *c,
}
static void free_stringlist(struct config *c,