]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: deinit: add cleanup for 51Degrees to deinit
authorThomas Holmes <tom@51degrees.com>
Thu, 14 May 2015 16:14:30 +0000 (17:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Jun 2015 12:00:25 +0000 (14:00 +0200)
src/haproxy.c

index ecdf20603d1a52826130d4c7abafc3288e07983c..daf68d0b65dc5fb67924ba1d25036f5777c119a7 100644 (file)
@@ -1231,6 +1231,7 @@ void deinit(void)
        struct logsrv *log, *logb;
        struct logformat_node *lf, *lfb;
        struct bind_conf *bind_conf, *bind_back;
+       struct _51d_property_names *_51d_prop_name, *_51d_prop_nameb;
        int i;
 
        deinit_signals();
@@ -1486,6 +1487,15 @@ void deinit(void)
        deinit_deviceatlas();
 #endif
 
+#ifdef USE_51DEGREES
+       fiftyoneDegreesDestroy(&global._51d_data_set);
+       free(global._51d_data_file_path); global._51d_data_file_path = NULL;
+       list_for_each_entry_safe(_51d_prop_name, _51d_prop_nameb, &global._51d_property_names, list) {
+               LIST_DEL(&_51d_prop_name->list);
+               free(_51d_prop_name);
+       }
+#endif
+
        free(global.log_send_hostname); global.log_send_hostname = NULL;
        free(global.log_tag); global.log_tag = NULL;
        free(global.chroot);  global.chroot = NULL;