From f191faf2ff66ef262896fe22a8752e585020c8a8 Mon Sep 17 00:00:00 2001 From: BlackLight Date: Mon, 14 Feb 2011 15:57:13 +0100 Subject: [PATCH] Fixing a mutex unlock bug in correlation.c --- correlation.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/correlation.c b/correlation.c index ed87ece..37b81c4 100644 --- a/correlation.c +++ b/correlation.c @@ -673,13 +673,22 @@ AI_alert_correlation_thread ( void *arg ) snprintf ( corr_ps_file , sizeof ( corr_ps_file ), "%s/correlated_alerts.ps" , config->corr_alerts_dir ); if ( !( gvc = gvContext() )) + { + pthread_mutex_unlock ( &mutex ); continue; + } if ( !( fp = fopen ( corr_dot_file, "r" ))) + { + pthread_mutex_unlock ( &mutex ); continue; + } if ( !( g = agread ( fp ))) + { + pthread_mutex_unlock ( &mutex ); continue; + } gvLayout ( gvc, g, "dot" ); gvRenderFilename ( gvc, g, "png", corr_png_file );