From 0f2799aaf1e33aa474a12b9389728d57af926cb3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 28 Feb 2001 00:51:02 +0000 Subject: Move to talloc control of SPOOL_XXX structs. Move to talloc control of security descriptors and pointers. Syncup with 2.2 tree. Jeremy. (This used to be commit 14d5997dc841e78a619e865288486d50c245896d) --- source3/smbd/nttrans.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'source3/smbd/nttrans.c') diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index cf2bdef314..c326dd561f 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1099,7 +1099,6 @@ static BOOL set_sd(files_struct *fsp, char *data, uint32 sd_len, uint security_i */ if(!sec_io_desc( "sd data", &psd, &pd, 1)) { - free_sec_desc(&psd); DEBUG(0,("set_sd: Error in unmarshalling security descriptor.\n")); /* * Return access denied for want of a better error message.. @@ -1122,14 +1121,12 @@ static BOOL set_sd(files_struct *fsp, char *data, uint32 sd_len, uint security_i ret = set_nt_acl( fsp, security_info_sent, psd); if (!ret) { - free_sec_desc(&psd); talloc_destroy(mem_ctx); *pdef_class = ERRDOS; *pdef_code = ERRnoaccess; return False; } - free_sec_desc(&psd); talloc_destroy(mem_ctx); *pdef_class = 0; @@ -1638,8 +1635,6 @@ static int call_nt_transact_query_security_desc(connection_struct *conn, if(max_data_count < sd_size) { - free_sec_desc(&psd); - send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_BUFFER_TOO_SMALL, params, 4, *ppdata, 0); return -1; @@ -1651,7 +1646,6 @@ static int call_nt_transact_query_security_desc(connection_struct *conn, data = Realloc(*ppdata, sd_size); if(data == NULL) { - free_sec_desc(&psd); return(ERROR(ERRDOS,ERRnomem)); } @@ -1665,7 +1659,6 @@ static int call_nt_transact_query_security_desc(connection_struct *conn, if ((mem_ctx = talloc_init()) == NULL) { DEBUG(0,("call_nt_transact_query_security_desc: talloc_init failed.\n")); - free_sec_desc(&psd); return(ERROR(ERRDOS,ERRnomem)); } @@ -1683,7 +1676,6 @@ static int call_nt_transact_query_security_desc(connection_struct *conn, */ if(!sec_io_desc( "sd data", &psd, &pd, 1)) { - free_sec_desc(&psd); DEBUG(0,("call_nt_transact_query_security_desc: Error in marshalling \ security descriptor.\n")); /* @@ -1697,7 +1689,6 @@ security descriptor.\n")); * Now we can delete the security descriptor. */ - free_sec_desc(&psd); talloc_destroy(mem_ctx); send_nt_replies(inbuf, outbuf, bufsize, 0, params, 4, data, (int)sd_size); -- cgit