summaryrefslogtreecommitdiffstats
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2001-09-17 11:25:41 +0000
committerSimo Sorce <idra@samba.org>2001-09-17 11:25:41 +0000
commit61b2794968faa35dc91edce17e9b91e5366c3514 (patch)
tree3fd9ec24adcdf149263066754f5e51ac7a4e14e0 /source3/smbd/trans2.c
parent87945989c0383bd012be7ab8bc5920b6d03fa105 (diff)
downloadsamba-61b2794968faa35dc91edce17e9b91e5366c3514.tar.gz
samba-61b2794968faa35dc91edce17e9b91e5366c3514.tar.xz
samba-61b2794968faa35dc91edce17e9b91e5366c3514.zip
move to SAFE_FREE()
(This used to be commit a95943fde0ad89ae3f2deca2f7ba9cb5ab612b74)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index cb4ca994f4..139b97d088 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -2466,10 +2466,8 @@ int reply_trans2(connection_struct *conn,
if ((total_params && !params) || (total_data && !data)) {
DEBUG(2,("Out of memory in reply_trans2\n"));
- if(params)
- free(params);
- if(data)
- free(data);
+ SAFE_FREE(params);
+ SAFE_FREE(data);
END_PROFILE(SMBtrans2);
return ERROR_DOS(ERRDOS,ERRnomem);
}
@@ -2508,10 +2506,8 @@ int reply_trans2(connection_struct *conn,
else
DEBUG(0,("reply_trans2: %s in getting secondary trans2 response.\n",
(smb_read_error == READ_ERROR) ? "error" : "timeout" ));
- if(params)
- free(params);
- if(data)
- free(data);
+ SAFE_FREE(params);
+ SAFE_FREE(data);
END_PROFILE(SMBtrans2);
return ERROR_DOS(ERRSRV,ERRerror);
}
@@ -2632,10 +2628,8 @@ int reply_trans2(connection_struct *conn,
default:
/* Error in request */
DEBUG(2,("Unknown request %d in trans2 call\n", tran_call));
- if(params)
- free(params);
- if(data)
- free(data);
+ SAFE_FREE(params);
+ SAFE_FREE(data);
END_PROFILE(SMBtrans2);
return ERROR_DOS(ERRSRV,ERRerror);
}
@@ -2647,10 +2641,8 @@ int reply_trans2(connection_struct *conn,
an error packet.
*/
- if(params)
- free(params);
- if(data)
- free(data);
+ SAFE_FREE(params);
+ SAFE_FREE(data);
END_PROFILE(SMBtrans2);
return outsize; /* If a correct response was needed the
call_trans2xxx calls have already sent