From 712a30ed51ca2b58e00d38a5d6d70d564b1da11b Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Sat, 27 May 2000 09:19:57 +0000 Subject: prs_give_memory in wrong place, also poss. was losing mem. (This used to be commit 9805e17cd0ce427c329a8b5a8318d5f75227e283) --- source3/smbd/nttrans.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source3/smbd/nttrans.c') diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index a149374114..bb0436aab3 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1924,7 +1924,13 @@ static int call_nt_transact_query_security_desc(connection_struct *conn, * Init the parse struct we will marshall into. */ - prs_init(&pd, sec_desc_size, 4, MARSHALL); + prs_init(&pd, 0, 4, MARSHALL); + + /* + * copy the data out of the marshalled structure + */ + + prs_give_memory( &pd, data, (uint32)sec_desc_size, False); /* * Finally, linearize into the outgoing buffer. @@ -1943,12 +1949,6 @@ security descriptor.\n")); return(UNIXERROR(ERRDOS,ERRnoaccess)); } - /* - * copy the data out of the marshalled structure - */ - - prs_give_memory( &pd, data, (uint32)sec_desc_size, False); - /* * Now we can delete the security descriptor. */ -- cgit