From 7c64a1df4ed4c3d001d03b4ec3c4e84638a12d86 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 29 Nov 2017 20:11:44 +0100 Subject: ipcpd, irmd: Bugfix for failed accept() calls The ipcp will not have the rx_rb set for a pending flow, so it should not call shm_rbuff_fini. The irmd should not call ipcp_flow_dealloc for flows that are still pending flow allocation. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/dev.c') diff --git a/src/lib/dev.c b/src/lib/dev.c index 3c81d1db..a577ca80 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -1369,7 +1369,8 @@ void ipcp_flow_fini(int fd) pthread_rwlock_unlock(&ai.lock); - shm_rbuff_fini(rx_rb); + if (rx_rb != NULL) + shm_rbuff_fini(rx_rb); } int ipcp_flow_get_qoscube(int fd, -- cgit v1.2.3