summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-03-22 13:47:42 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-03-22 13:47:42 +0000
commit1f499a79f5468e87d26b60ffe3aa375b91cadbef (patch)
tree095f7f163807060eadd42bf84a876aac1724b062 /source3/lib/util.c
parentb33cee92ed7e6729291616778963037f0d2f2f30 (diff)
downloadsamba-1f499a79f5468e87d26b60ffe3aa375b91cadbef.tar.gz
samba-1f499a79f5468e87d26b60ffe3aa375b91cadbef.tar.bz2
samba-1f499a79f5468e87d26b60ffe3aa375b91cadbef.zip
(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 c91e76bddbe1244ddc8d12b092eba875834029ac)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 4216310335..4f564b332a 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -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;
}