From 5d5ee328b084b065fcc536fb15dfbdedb9fe7563 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Fri, 5 Apr 2013 15:05:44 +0200 Subject: [PATCH] Fix for Coverity CID #996825 --- src/csync.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/csync.c b/src/csync.c index 68e3f8dbbd..f42c03cd8d 100644 --- a/src/csync.c +++ b/src/csync.c @@ -568,8 +568,11 @@ static int _csync_treewalk_visitor(void *obj, void *data) { cur = (csync_file_stat_t *) obj; ctx = (CSYNC *) data; + if (!ctx) { + return -1; + } - if (!(ctx && obj && data)) { + if (!obj || !data) { ctx->error_code = CSYNC_ERR_PARAM; return -1; }