Merged in the security fixes from 2.5.7.
[rsync/rsync.git] / log.c
diff --git a/log.c b/log.c
index 3ffd3e2..d440a16 100644 (file)
--- 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);
@@ -572,17 +572,3 @@ void log_exit(int code, const char *file, int line)
                        name, code, file, line);
        }
 }
-
-/*
- * Log the incoming transfer of a file for interactive use,
- * this will be called at the end where the client was run.
- * Called when a file starts to be transferred.
- */
-void log_transfer(struct file_struct *file, const char *fname)
-{
-       extern int verbose;
-
-       if (!verbose) return;
-
-       rprintf(FINFO, "%s\n", fname);
-}