summaryrefslogtreecommitdiff
path: root/cups/thread.c
diff options
context:
space:
mode:
authorMichael Sweet <michael.r.sweet@gmail.com>2017-09-14 14:12:49 -0400
committerMichael Sweet <michael.r.sweet@gmail.com>2017-09-14 14:12:49 -0400
commitb908d72cace0a011612ba312c7b1a746b74cf80d (patch)
treec7a999092370f37c3a0b1bc8cec48d46e773b787 /cups/thread.c
parent2cb1fda9fe6c10da0653e439d86ead125c963720 (diff)
downloadcups-b908d72cace0a011612ba312c7b1a746b74cf80d.tar.gz
Fix memory leaks.
Diffstat (limited to 'cups/thread.c')
-rw-r--r--cups/thread.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/cups/thread.c b/cups/thread.c
index 77b44426e..7af45ea70 100644
--- a/cups/thread.c
+++ b/cups/thread.c
@@ -1,7 +1,7 @@
/*
* Threading primitives for CUPS.
*
- * Copyright 2009-2016 by Apple Inc.
+ * Copyright 2009-2017 by Apple Inc.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
@@ -173,6 +173,17 @@ _cupsThreadCreate(
/*
+ * '_cupsThreadDetach()' - Tell the OS that the thread is running independently.
+ */
+
+void
+_cupsThreadDetach(_cups_thread_t thread)/* I - Thread ID */
+{
+ pthread_detach(thread);
+}
+
+
+/*
* '_cupsThreadWait()' - Wait for a thread to exit.
*/