summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/os/timer.c
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2016-11-18 16:33:52 +0000
committerPatrick Mooney <pmooney@pfmooney.com>2016-11-18 22:16:46 +0000
commit5b508be5188fbc34f5e626fc0125a75be65a2057 (patch)
treef338bcc0b3d53fb318761f41b562a80ec02c6ab2 /usr/src/uts/common/os/timer.c
parentacaf9b750d3116b5a05a4d23d4aa10c788ca318b (diff)
downloadillumos-joyent-5b508be5188fbc34f5e626fc0125a75be65a2057.tar.gz
OS-5806 timer_create leaks itimer_t
Reviewed by: Ryan Zezeski <rpz@joyent.com> Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>
Diffstat (limited to 'usr/src/uts/common/os/timer.c')
-rw-r--r--usr/src/uts/common/os/timer.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr/src/uts/common/os/timer.c b/usr/src/uts/common/os/timer.c
index 9e4bfe190e..845b93da6e 100644
--- a/usr/src/uts/common/os/timer.c
+++ b/usr/src/uts/common/os/timer.c
@@ -661,12 +661,9 @@ timer_create(clockid_t clock, struct sigevent *evp, timer_t *tid)
}
/*
- * We'll allocate our timer and sigqueue now, before we grab p_lock.
- * If we can't find an empty slot, we'll free them before returning.
+ * We'll allocate our sigqueue now, before we grab p_lock.
+ * If we can't find an empty slot, we'll free it before returning.
*/
- it = kmem_cache_alloc(clock_timer_cache, KM_SLEEP);
- bzero(it, sizeof (itimer_t));
- mutex_init(&it->it_mutex, NULL, MUTEX_DEFAULT, NULL);
sigq = kmem_zalloc(sizeof (sigqueue_t), KM_SLEEP);
/*