diff options
Diffstat (limited to 'ctdb/tools')
-rw-r--r-- | ctdb/tools/ctdb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index b598a866c9b..eb4c684e8b0 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -626,6 +626,9 @@ static int str_to_data(const char *str, size_t len, TALLOC_CTX *mem_ctx, if (strncmp(str, "0x", 2) == 0) { ret = hex_to_data(str+2, len-2, mem_ctx, &data); + if (ret != 0) { + return ret; + } } else { data.dptr = talloc_memdup(mem_ctx, str, len); if (data.dptr == NULL) { @@ -635,7 +638,7 @@ static int str_to_data(const char *str, size_t len, TALLOC_CTX *mem_ctx, } *out = data; - return ret; + return 0; } static int run_helper(TALLOC_CTX *mem_ctx, const char *command, |