summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-02-28 20:35:08 +0000
committerJeremy Allison <jra@samba.org>2001-02-28 20:35:08 +0000
commitbd228fb059e3c8a7c82a3019e31163f549881773 (patch)
tree72ccc7cf2fd2c11a8903c4b4743bade93abf0b3b
parent8f873d567644d6dec06020891053ad62a277e014 (diff)
downloadsamba-bd228fb059e3c8a7c82a3019e31163f549881773.tar.gz
samba-bd228fb059e3c8a7c82a3019e31163f549881773.tar.bz2
samba-bd228fb059e3c8a7c82a3019e31163f549881773.zip
Fix for stack return from "Jim McDonough" <jmcdough@hotmail.com>.
Jeremy. (This used to be commit 7f45836c85df9cb04d062b71afa5e55014841859)
-rw-r--r--source3/rpc_server/srv_wkssvc_nt.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c
index 81d3e1ef8f..688c7f1d01 100644
--- a/source3/rpc_server/srv_wkssvc_nt.c
+++ b/source3/rpc_server/srv_wkssvc_nt.c
@@ -63,12 +63,17 @@ static void create_wks_info_100(WKS_INFO_100 *inf)
uint32 _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u)
{
- WKS_INFO_100 wks100;
+ WKS_INFO_100 *wks100 = NULL;
DEBUG(5,("_wks_query_info: %d\n", __LINE__));
- create_wks_info_100(&wks100);
- init_wks_r_query_info(r_u, q_u->switch_value, &wks100, NT_STATUS_NOPROBLEMO);
+ wks100 = (WKS_INFO_100 *)talloc_zero(p->mem_ctx, sizeof(WKS_INFO_100));
+
+ if (!wks100)
+ return NT_STATUS_NO_MEMORY;
+
+ create_wks_info_100(wks100);
+ init_wks_r_query_info(r_u, q_u->switch_value, wks100, NT_STATUS_NOPROBLEMO);
DEBUG(5,("_wks_query_info: %d\n", __LINE__));