From b04db9a5ef7c462dacbf033dcaff84da7647463f Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Thu, 27 Oct 2016 11:48:33 +0200 Subject: [PATCH] main: fix NULL pointer deref Regression from e969219fca0669e611d79b4a3f71ec0fe5d2bba5 --- kernel/sy_old/mars_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sy_old/mars_main.c b/kernel/sy_old/mars_main.c index 462fb775..7f781e93 100644 --- a/kernel/sy_old/mars_main.c +++ b/kernel/sy_old/mars_main.c @@ -2680,7 +2680,7 @@ bool is_switchover_possible(struct mars_rotate *rot, const char *old_log_path, c } // last check: is the new versionlink based on the old one? - if (!skip_new) { + if (new_versionlink) { len1 = skip_sect(own_versionlink); offs2 = skip_sect(new_versionlink); if (unlikely(!new_versionlink[offs2++])) {