From 6d0beb088565abeaca53e4346dc94940c7de398e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 9 Jan 2006 17:43:48 +0000 Subject: r12797: check for a error metze (This used to be commit ed4fbfcf3e5b7133e73ee031ad5c68659690e2b1) --- source4/smbd/process_thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/smbd/process_thread.c') diff --git a/source4/smbd/process_thread.c b/source4/smbd/process_thread.c index b79c2f76b5..af111362b2 100644 --- a/source4/smbd/process_thread.c +++ b/source4/smbd/process_thread.c @@ -405,9 +405,10 @@ static uint32_t thread_get_task_id(void) static void thread_log_task_id(int fd) { - char *s; + char *s= NULL; asprintf(&s, "thread %u: ", (uint32_t)pthread_self()); + if (!s) return; write(fd, s, strlen(s)); free(s); } -- cgit