From d53b2c108aa133b115248104a057d76e64ce9eea Mon Sep 17 00:00:00 2001 From: koennecke Date: Wed, 29 Mar 2017 12:20:32 +0200 Subject: [PATCH] Fixed a bug in epicsadpater where a SCDeleteConnection called from EpicsWriteFunc called Log() . This the was called from a thread which did not have a connection to the MongoDB. This caused a core dump. --- epicsadapter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epicsadapter.c b/epicsadapter.c index 3a9ed09..17dde96 100644 --- a/epicsadapter.c +++ b/epicsadapter.c @@ -382,7 +382,9 @@ static void EpicsWriteFunc(void *param) goto cleanup; cleanup: - SCDeleteConnection(wp->pCon); + if(wp->pCon != NULL){ + SCDeleteConnection(wp->pCon); + } ReleaseHdbValue(&wp->v); free(wp); free(pv);