From acf9d61421faa6c0055d57fdee7db300dc5431aa Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 7 Dec 2004 18:25:53 +0000 Subject: r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a) --- source3/smbd/password.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/smbd/password.c') diff --git a/source3/smbd/password.c b/source3/smbd/password.c index eb389d7013..213ef98ea3 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -139,7 +139,7 @@ int register_vuid(auth_serversupplied_info *server_info, DATA_BLOB session_key, return UID_FIELD_INVALID; } - if((vuser = (user_struct *)malloc( sizeof(user_struct) )) == NULL) { + if((vuser = SMB_MALLOC_P(user_struct)) == NULL) { DEBUG(0,("Failed to malloc users struct!\n")); data_blob_free(&session_key); return UID_FIELD_INVALID; @@ -316,7 +316,7 @@ void add_session_user(const char *user) DEBUG(3,("add_session_user: session userlist already too large.\n")); return; } - newlist = Realloc( session_userlist, len_session_userlist + PSTRING_LEN ); + newlist = SMB_REALLOC( session_userlist, len_session_userlist + PSTRING_LEN ); if( newlist == NULL ) { DEBUG(1,("Unable to resize session_userlist\n")); return; @@ -498,9 +498,9 @@ BOOL authorise_login(int snum, fstring user, DATA_BLOB password, char *user_list = NULL; if ( session_userlist ) - user_list = strdup(session_userlist); + user_list = SMB_STRDUP(session_userlist); else - user_list = strdup(""); + user_list = SMB_STRDUP(""); if (!user_list) return(False); -- cgit