diff options
author | Günther Deschner <gd@samba.org> | 2011-03-30 12:39:36 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-03-30 13:49:35 +0200 |
commit | 65c9d2e6216f71f258ea796d0959bf7e1e4d8732 (patch) | |
tree | 0d8904c2e8b8a65241e76c6b4ca9952bd2a9fc2d /source3/rpc_server/srvsvc | |
parent | 43e364e61bc232e167ed1a18de037f8a278c8c24 (diff) | |
download | samba-65c9d2e6216f71f258ea796d0959bf7e1e4d8732.tar.gz samba-65c9d2e6216f71f258ea796d0959bf7e1e4d8732.tar.bz2 samba-65c9d2e6216f71f258ea796d0959bf7e1e4d8732.zip |
s3: Fix Coverity ID 2041, "UNUSED_VALUE"
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Mar 30 13:49:35 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_server/srvsvc')
-rw-r--r-- | source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c index 77627dc409..df882d729a 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -494,16 +494,20 @@ static void init_srv_share_info_1007(struct pipes_struct *p, ********************************************************************/ static void init_srv_share_info_1501(struct pipes_struct *p, - struct sec_desc_buf *r, + struct sec_desc_buf **r, int snum) { struct security_descriptor *sd; + struct sec_desc_buf *sd_buf = NULL; size_t sd_size; TALLOC_CTX *ctx = p->mem_ctx; sd = get_share_security(ctx, lp_servicename(snum), &sd_size); + if (sd) { + sd_buf = make_sec_desc_buf(p->mem_ctx, sd_size, sd); + } - r = make_sec_desc_buf(p->mem_ctx, sd_size, sd); + *r = sd_buf; } /******************************************************************* @@ -749,7 +753,9 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p, for (snum = 0; snum < num_services; snum++) { if (allowed[snum] && (resume_handle <= (i + valid_share_count++)) ) { - init_srv_share_info_1501(p, &ctr.ctr1501->array[i++], snum); + struct sec_desc_buf *sd_buf = NULL; + init_srv_share_info_1501(p, &sd_buf, snum); + ctr.ctr1501->array[i++] = *sd_buf; } } @@ -1483,7 +1489,7 @@ WERROR _srvsvc_NetShareGetInfo(struct pipes_struct *p, init_srv_share_info_1007(p, info->info1007, snum); break; case 1501: - init_srv_share_info_1501(p, info->info1501, snum); + init_srv_share_info_1501(p, &info->info1501, snum); break; default: DEBUG(5,("_srvsvc_NetShareGetInfo: unsupported switch value %d\n", |