From 4396c5fbc85848c69b3318397a7ed8b67d76a05f Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Thu, 14 Jul 2016 14:20:26 +0200 Subject: [PATCH] cdp: fix occasional segfault on process exit --- modules/cdp/diameter_peer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/cdp/diameter_peer.c b/modules/cdp/diameter_peer.c index dd571b2d813..cd0b85ea3f0 100644 --- a/modules/cdp/diameter_peer.c +++ b/modules/cdp/diameter_peer.c @@ -411,6 +411,9 @@ void diameter_peer_destroy() int pid,status; handler *h; + if (!shutdownx_lock) { + return; + } lock_get(shutdownx_lock); if (*shutdownx) { /* already other process is cleaning stuff */