diff options
author | Andreas Schneider <asn@samba.org> | 2012-12-10 13:24:46 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2012-12-12 09:42:32 +0100 |
commit | 33d1d525080297686f60b46661b0b4021d31199b (patch) | |
tree | 163623c9a9bb24457b394d1be1e73cd9834d84ea /source3/lib/netapi | |
parent | 4c0b4894d58094f95d8f053651104521e46da4ec (diff) | |
download | samba-33d1d525080297686f60b46661b0b4021d31199b.tar.gz samba-33d1d525080297686f60b46661b0b4021d31199b.tar.bz2 samba-33d1d525080297686f60b46661b0b4021d31199b.zip |
s3-netapi: Fix zeroing policy handles in NetLocalGroupAdd_r().
Found by Coverity.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r-- | source3/lib/netapi/localgroup.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c index 816afc230f..1a544adecd 100644 --- a/source3/lib/netapi/localgroup.c +++ b/source3/lib/netapi/localgroup.c @@ -159,6 +159,11 @@ WERROR NetLocalGroupAdd_r(struct libnetapi_ctx *ctx, return WERR_INVALID_PARAM; } + ZERO_STRUCT(connect_handle); + ZERO_STRUCT(builtin_handle); + ZERO_STRUCT(domain_handle); + ZERO_STRUCT(alias_handle); + switch (r->in.level) { case 0: info0 = (struct LOCALGROUP_INFO_0 *)r->in.buffer; @@ -173,11 +178,6 @@ WERROR NetLocalGroupAdd_r(struct libnetapi_ctx *ctx, goto done; } - ZERO_STRUCT(connect_handle); - ZERO_STRUCT(builtin_handle); - ZERO_STRUCT(domain_handle); - ZERO_STRUCT(alias_handle); - werr = libnetapi_open_pipe(ctx, r->in.server_name, &ndr_table_samr.syntax_id, &pipe_cli); |