From 0899eeeb8e61ce57c0eed7fb8b74a5ae9d773fa7 Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Sun, 27 Dec 2009 10:10:49 +0530 Subject: [PATCH] Fix for Unified Alert Test Bug #14 --- src/alert-unified-alert.c | 2 ++ src/alert-unified-log.c | 2 ++ src/alert-unified2-alert.c | 2 ++ 3 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/alert-unified-alert.c b/src/alert-unified-alert.c index cd28082..ec24d53 100644 --- a/src/alert-unified-alert.c +++ b/src/alert-unified-alert.c @@ -331,6 +331,8 @@ static int AlertUnifiedAlertTestRotate01(void) void *data = NULL; lf = AlertUnifiedAlertInitCtx(NULL); + if (lf == NULL) + return 0; char *filename = strdup(lf->filename); memset(&tv, 0, sizeof(ThreadVars)); diff --git a/src/alert-unified-log.c b/src/alert-unified-log.c index 46e8f9e..edc04ed 100644 --- a/src/alert-unified-log.c +++ b/src/alert-unified-log.c @@ -349,6 +349,8 @@ static int AlertUnifiedLogTestRotate01(void) void *data = NULL; lf = AlertUnifiedLogInitCtx(NULL); + if (lf == NULL) + return 0; char *filename = strdup(lf->filename); memset(&tv, 0, sizeof(ThreadVars)); diff --git a/src/alert-unified2-alert.c b/src/alert-unified2-alert.c index f436b2c..c826ffb 100644 --- a/src/alert-unified2-alert.c +++ b/src/alert-unified2-alert.c @@ -947,6 +947,8 @@ static int Unified2TestRotate01(void) void *data = NULL; lf = Unified2AlertInitCtx(NULL); + if (lf == NULL) + return 0; char *filename = strdup(lf->filename); memset(&tv, 0, sizeof(ThreadVars)); -- 1.5.5