summaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2003-12-06 21:07:27 +0000
committerWayne Davison <wayned@samba.org>2003-12-06 21:07:27 +0000
commit58cadc8608fbb2cbc7b74578cd92de4337a4b887 (patch)
tree2a6d671629752eb4f319556b8d8438d535b8cd44 /log.c
parentb11b50bcd026a0a052bdfab7b96c97045b658d86 (diff)
downloadrsync-58cadc8608fbb2cbc7b74578cd92de4337a4b887.tar.gz
Merged in the security fixes from 2.5.7.
Diffstat (limited to 'log.c')
-rw-r--r--log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/log.c b/log.c
index 34ff6d3d..d440a16f 100644
--- a/log.c
+++ b/log.c
@@ -90,10 +90,10 @@ static struct err_list *err_list_tail;
static void err_list_add(int code, char *buf, int len)
{
struct err_list *el;
- el = (struct err_list *)malloc(sizeof(*el));
+ el = new(struct err_list);
if (!el) exit_cleanup(RERR_MALLOC);
el->next = NULL;
- el->buf = malloc(len+4);
+ el->buf = new_array(char, len+4);
if (!el->buf) exit_cleanup(RERR_MALLOC);
memcpy(el->buf+4, buf, len);
SIVAL(el->buf, 0, ((code+MPLEX_BASE)<<24) | len);