mirror of
https://github.com/samba-team/samba.git
synced 2025-08-05 12:22:11 +03:00
(merge from HEAD)
Small clenaup patches:
- safe_string.h - don't assume that __FUNCTION__ is available
- process.c - use new workaround from safe_string.h for the same
- util.c - Show how many bytes we smb_panic()ed trying to smb_xmalloc()
- gencache.c - Keep valgrind quiet by always null terminating.
- clistr.c - Add copyright
- srvstr.h - move srvstr_push into a .c file again, as a real function.
- srvstr.c - revive, with 'safe' checked srvstr_push
- loadparm.c - set a default for the display charset.
- connection.c - use safe_strcpy()
Andrew Bartlett
(This used to be commit c91e76bddb
)
This commit is contained in:
@ -2089,8 +2089,10 @@ void *smb_xmalloc(size_t size)
|
||||
void *p;
|
||||
if (size == 0)
|
||||
smb_panic("smb_xmalloc: called with zero size.\n");
|
||||
if ((p = malloc(size)) == NULL)
|
||||
if ((p = malloc(size)) == NULL) {
|
||||
DEBUG(0, ("smb_xmalloc() failed to allocate %lu bytes\n", (unsigned long)size));
|
||||
smb_panic("smb_xmalloc: malloc fail.\n");
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user