summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 20a3c20fb9..e86942cfe1 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -620,12 +620,13 @@ set_options(or_options_t *new_val, char **msg)
tor_free(line);
}
} else {
- smartlist_add(elements, (char*)options_format.vars[i].name);
+ smartlist_add(elements, tor_strdup(options_format.vars[i].name));
smartlist_add(elements, NULL);
}
}
}
control_event_conf_changed(elements);
+ SMARTLIST_FOREACH(elements, char *, cp, tor_free(cp));
smartlist_free(elements);
}