From b13b5f9af2c2803f919d8897cd3ed5d24831cad3 Mon Sep 17 00:00:00 2001 From: Joshua Allen Date: Tue, 7 Mar 2017 21:48:30 -0500 Subject: null after free --- src/survive_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/survive_config.c') diff --git a/src/survive_config.c b/src/survive_config.c index f30bf87..8e0241a 100644 --- a/src/survive_config.c +++ b/src/survive_config.c @@ -25,8 +25,8 @@ void init_config_entry(config_entry* ce) { } void destroy_config_entry(config_entry* ce) { - if (ce->tag!=NULL) free(ce->tag); - if (ce->data!=NULL) free(ce->data); + if (ce->tag!=NULL) { free(ce->tag); ce->tag=NULL; } + if (ce->data!=NULL) { free(ce->data); ce->data=NULL; } } void init_config_group(config_group *cg, uint16_t count) { -- cgit v1.2.3