summaryrefslogtreecommitdiff
path: root/src/or/confparse.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-12-08 14:58:43 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-08 14:58:43 -0500
commit5ee0cccd49e57fad8c810e817d912d4a61dbc96c (patch)
tree2aa4d71a332805bcb1bf7746887e7435ffdc51f4 /src/or/confparse.h
parent44010c6fc11608b13924372a179825946672cb23 (diff)
parent7ca5f4bf0365b853cdb0bab5cc9cb0ce6deaec26 (diff)
downloadtor-5ee0cccd49e57fad8c810e817d912d4a61dbc96c.tar.gz
tor-5ee0cccd49e57fad8c810e817d912d4a61dbc96c.zip
Merge branch 'macro_free_v2_squashed'
Diffstat (limited to 'src/or/confparse.h')
-rw-r--r--src/or/confparse.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/confparse.h b/src/or/confparse.h
index 022886e811..fc4a7b2d06 100644
--- a/src/or/confparse.h
+++ b/src/or/confparse.h
@@ -177,7 +177,12 @@ typedef struct config_format_t {
#define CAL_WARN_DEPRECATIONS (1u<<2)
void *config_new(const config_format_t *fmt);
-void config_free(const config_format_t *fmt, void *options);
+void config_free_(const config_format_t *fmt, void *options);
+#define config_free(fmt, options) do { \
+ config_free_((fmt), (options)); \
+ (options) = NULL; \
+ } while (0)
+
config_line_t *config_get_assigned_option(const config_format_t *fmt,
const void *options, const char *key,
int escape_val);