s3-netapi: Fix Coverity #670: FORWARD_NULL.
authorGünther Deschner <gd@samba.org>
Wed, 16 Sep 2009 08:24:55 +0000 (10:24 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 16 Sep 2009 08:29:54 +0000 (10:29 +0200)
Guenther

source3/lib/netapi/user.c

index 9fa3ddd9a89a4230d3889a41d946b62bb2765f1c..e23587d6aa4b6f826569dfaed6a3b41e8f0aa175 100644 (file)
@@ -1864,7 +1864,7 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx,
        werr = WERR_OK;
 
  done:
        werr = WERR_OK;
 
  done:
-       if (is_valid_policy_hnd(&user_handle)) {
+       if (is_valid_policy_hnd(&user_handle) && pipe_cli) {
                rpccli_samr_Close(pipe_cli, ctx, &user_handle);
        }
 
                rpccli_samr_Close(pipe_cli, ctx, &user_handle);
        }