Free unused pointers
This commit is contained in:
parent
77fd797019
commit
d2a71f8ebc
@ -138,6 +138,8 @@ log_printf(const log_t *log, const char *format,...)
|
|||||||
|
|
||||||
write(log->fd, message, strnlen(message, MAX_MSG_SIZE));
|
write(log->fd, message, strnlen(message, MAX_MSG_SIZE));
|
||||||
write(log->fd, newline, sizeof(*newline));
|
write(log->fd, newline, sizeof(*newline));
|
||||||
|
|
||||||
|
free(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -168,6 +170,8 @@ log_tsprintf(const log_t *log, const char *format,...)
|
|||||||
write(log->fd, s_time, tsize);
|
write(log->fd, s_time, tsize);
|
||||||
write(log->fd, message, strnlen(message, MAX_MSG_SIZE));
|
write(log->fd, message, strnlen(message, MAX_MSG_SIZE));
|
||||||
write(log->fd, newline, sizeof(*newline));
|
write(log->fd, newline, sizeof(*newline));
|
||||||
|
|
||||||
|
free(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user