summaryrefslogtreecommitdiffstats
path: root/kernel/posix-timers.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2008-10-02 14:50:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-02 15:53:13 -0700
commitaa94fbd5ccd840c8ab26d02439ec799b03a72547 (patch)
tree37ebc732cc75d827e5779f2297b6a28c0f0eadaa /kernel/posix-timers.c
parentc0c9209ddd96bc4f1d70a8b9958710671e076080 (diff)
downloadlinux-stable-aa94fbd5ccd840c8ab26d02439ec799b03a72547.tar.gz
linux-stable-aa94fbd5ccd840c8ab26d02439ec799b03a72547.tar.bz2
linux-stable-aa94fbd5ccd840c8ab26d02439ec799b03a72547.zip
fix error-path NULL deref in alloc_posix_timer()
Found by static checker (http://repo.or.cz/w/smatch.git). Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r--kernel/posix-timers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index e36d5798cbff..5131e5471169 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -441,7 +441,7 @@ static struct k_itimer * alloc_posix_timer(void)
return tmr;
if (unlikely(!(tmr->sigq = sigqueue_alloc()))) {
kmem_cache_free(posix_timers_cache, tmr);
- tmr = NULL;
+ return NULL;
}
memset(&tmr->sigq->info, 0, sizeof(siginfo_t));
return tmr;