summaryrefslogtreecommitdiffstats
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2015-01-28 18:51:42 +1100
committerAmitay Isaacs <amitay@samba.org>2015-02-04 03:14:07 +0100
commit5e00673f2d95b6257a05324d2ae068004e29ff85 (patch)
treea9285da157cf8acab4627b1a6a6483d9be2c17d5 /ctdb
parent362cac25a744d2d5c6e01495d341969b863d7f12 (diff)
downloadsamba-5e00673f2d95b6257a05324d2ae068004e29ff85.tar.gz
samba-5e00673f2d95b6257a05324d2ae068004e29ff85.tar.xz
samba-5e00673f2d95b6257a05324d2ae068004e29ff85.zip
ctdb-daemon: Fix SET_RECLOCK_FILE regression
If the recovery lock file is unset then this dereferences a NULL pointer. The regression is due to commit 6f1ac7af0f87d85402d708231e45a69713bba026. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c
index 9d835e8d59..7bd1d0d7fb 100644
--- a/ctdb/server/ctdb_control.c
+++ b/ctdb/server/ctdb_control.c
@@ -531,7 +531,8 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
* master updates all nodes on each recovery - we
* don't need the extra memory allocation or log
* message each time. */
- if (strcmp(discard_const(indata.dptr),
+ if (ctdb->recovery_lock_file != NULL &&
+ strcmp(discard_const(indata.dptr),
ctdb->recovery_lock_file) == 0) {
return 0;
}