summaryrefslogtreecommitdiff
path: root/source3/lib/netapi
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-16 21:52:20 +0100
committerVolker Lendecke <vlendec@samba.org>2011-03-16 22:51:52 +0100
commitab37eae79c564ee903ca85c2d997093e17b1de98 (patch)
treea413b4b0ae84656b30d25248e20e327d72219158 /source3/lib/netapi
parent889e03617d6153040bbf462b631d9e752220281b (diff)
downloadsamba-ab37eae79c564ee903ca85c2d997093e17b1de98.tar.gz
samba-ab37eae79c564ee903ca85c2d997093e17b1de98.tar.bz2
samba-ab37eae79c564ee903ca85c2d997093e17b1de98.zip
s3: Fix Coverity ID 2231, REVERSE_INULL
No point in checking for !ctx after dereferencing it Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Mar 16 22:51:52 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r--source3/lib/netapi/cm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c
index 0e08c6d183..0b8220675d 100644
--- a/source3/lib/netapi/cm.c
+++ b/source3/lib/netapi/cm.c
@@ -62,8 +62,7 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx,
const char *server_name,
struct client_ipc_connection **pp)
{
- struct libnetapi_private_ctx *priv_ctx =
- (struct libnetapi_private_ctx *)ctx->private_data;
+ struct libnetapi_private_ctx *priv_ctx;
struct user_auth_info *auth_info = NULL;
struct cli_state *cli_ipc = NULL;
struct client_ipc_connection *p;
@@ -72,6 +71,8 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx,
return WERR_INVALID_PARAM;
}
+ priv_ctx = (struct libnetapi_private_ctx *)ctx->private_data;
+
p = ipc_cm_find(priv_ctx, server_name);
if (p) {
*pp = p;