From fd1120f84ba73b52bda50131343b54279c24ee82 Mon Sep 17 00:00:00 2001 From: Christine Caulfield Date: Fri, 2 Oct 2020 09:01:12 +0100 Subject: [PATCH 1/2] ipcs: Add missing qb_list_del when freeing server Fix from minhbq https://github.com/ClusterLabs/libqb/issues/422 --- lib/ipcs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ipcs.c b/lib/ipcs.c index 0609e46ac..a65c3f905 100644 --- a/lib/ipcs.c +++ b/lib/ipcs.c @@ -228,6 +228,7 @@ qb_ipcs_unref(struct qb_ipcs_service *s) free_it = qb_atomic_int_dec_and_test(&s->ref_count); if (free_it) { qb_util_log(LOG_DEBUG, "%s() - destroying", __func__); + qb_list_del(&s->list); free(s); } } From 8692611b8501239eafcbd6a9fd3b72f475bdef03 Mon Sep 17 00:00:00 2001 From: Christine Caulfield Date: Fri, 2 Oct 2020 10:17:38 +0100 Subject: [PATCH 2/2] ipcs: Remove list not used --- lib/ipcs.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/ipcs.c b/lib/ipcs.c index a65c3f905..2ecc8099e 100644 --- a/lib/ipcs.c +++ b/lib/ipcs.c @@ -32,7 +32,6 @@ static void qb_ipcs_flowcontrol_set(struct qb_ipcs_connection *c, static int32_t new_event_notification(struct qb_ipcs_connection * c); -static QB_LIST_DECLARE(qb_ipc_services); qb_ipcs_service_t * qb_ipcs_create(const char *name, @@ -72,8 +71,6 @@ qb_ipcs_create(const char *name, s->serv_fns.connection_destroyed = handlers->connection_destroyed; qb_list_init(&s->connections); - qb_list_init(&s->list); - qb_list_add(&s->list, &qb_ipc_services); return s; } @@ -228,7 +225,6 @@ qb_ipcs_unref(struct qb_ipcs_service *s) free_it = qb_atomic_int_dec_and_test(&s->ref_count); if (free_it) { qb_util_log(LOG_DEBUG, "%s() - destroying", __func__); - qb_list_del(&s->list); free(s); } }