From ed4fbfcf3e5b7133e73ee031ad5c68659690e2b1 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 9 Jan 2006 17:43:48 +0000 Subject: [PATCH] r12797: check for a error metze --- source/smbd/process_thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/smbd/process_thread.c b/source/smbd/process_thread.c index b79c2f76b51..af111362b20 100644 --- a/source/smbd/process_thread.c +++ b/source/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); }