From bd228fb059e3c8a7c82a3019e31163f549881773 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 28 Feb 2001 20:35:08 +0000 Subject: [PATCH] Fix for stack return from "Jim McDonough" . Jeremy. (This used to be commit 7f45836c85df9cb04d062b71afa5e55014841859) --- source3/rpc_server/srv_wkssvc_nt.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c index 81d3e1ef8f0..688c7f1d017 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__));