From e146a11456bc405ea4b71061b0640d9f9fe3ab9e Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Thu, 23 Feb 2017 11:31:32 +1100 Subject: [PATCH] ctdb-logging: CID 1396883 Dereference null return value (NULL_RETURNS) BUG: https://bugzilla.samba.org/show_bug.cgi?id=12592 The fix in 08e03fa7f5fdc7f988fbbb26929e8c5727f36c2e is incomplete. Signed-off-by: Martin Schwenke Reviewed-by: Jeremy Allison Reviewed-by: Amitay Isaacs (cherry picked from commit 55b75e4ecec17fdb741c12ad5a22846f77f71215) --- ctdb/common/logging.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ctdb/common/logging.c b/ctdb/common/logging.c index c8ccf26..8e547c9 100644 --- a/ctdb/common/logging.c +++ b/ctdb/common/logging.c @@ -522,6 +522,7 @@ int logging_init(TALLOC_CTX *mem_ctx, const char *logging, name = strtok(str, ":"); if (name == NULL) { + talloc_free(str); return EINVAL; } option = strtok(NULL, ":"); -- 2.9.3