summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srvsvc
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-10-09 12:46:57 -0700
committerJeremy Allison <jra@samba.org>2012-10-09 23:35:50 +0200
commit615951e4e77353547d91fb217b1861877540bde7 (patch)
treee966ff8ced5678cbae5213a560ec952936eb6741 /source3/rpc_server/srvsvc
parent5afabdc976d5ba1fd21dcdede85657b618fb6b76 (diff)
downloadsamba-615951e4e77353547d91fb217b1861877540bde7.tar.gz
samba-615951e4e77353547d91fb217b1861877540bde7.tar.bz2
samba-615951e4e77353547d91fb217b1861877540bde7.zip
Make sure the returned sd is on the right context, and if not it's always freed.
Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Oct 9 23:35:50 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/rpc_server/srvsvc')
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index 1d976e1e87..982b0b479b 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -2210,7 +2210,7 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
}
sd_buf->sd_size = sd_size;
- sd_buf->sd = psd;
+ sd_buf->sd = talloc_move(p->mem_ctx, &psd);
*r->out.sd_buf = sd_buf;
@@ -2237,6 +2237,8 @@ error_exit:
}
done:
+
+ TALLOC_FREE(psd);
TALLOC_FREE(smb_fname);
return werr;