diff options
author | Stefan Metzmacher <metze@samba.org> | 2022-06-13 11:32:30 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2022-07-01 17:35:27 +0000 |
commit | c5ef91865d49c516a272a91eb35d20b23838a5ce (patch) | |
tree | e681f9809f5404169d326f6f36ad459faccfd1b8 /source3/lib | |
parent | b609734c52dc12cf80faa693e981a4ef0ce4be4a (diff) | |
download | samba-c5ef91865d49c516a272a91eb35d20b23838a5ce.tar.gz |
s3:ctdbd_conn: make sure ctdbd_init_async_connection() never returns 0 with conn = NULL
This should not happen anywhere, but it clears the expectation of the
caller and simplifies the error handling there.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/ctdbd_conn.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 8fe94226590..dd9206b00fd 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -538,6 +538,8 @@ int ctdbd_init_async_connection( struct ctdbd_connection *conn = NULL; int ret; + *pconn = NULL; + ret = ctdbd_init_connection(mem_ctx, sockname, timeout, &conn); if (ret != 0) { return ret; @@ -546,6 +548,7 @@ int ctdbd_init_async_connection( ret = set_blocking(conn->fd, false); if (ret == -1) { int err = errno; + SMB_ASSERT(err != 0); TALLOC_FREE(conn); return err; } |