Skip to content

Commit aa94fbd

Browse files
error27torvalds
authored andcommitted
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>
1 parent c0c9209 commit aa94fbd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/posix-timers.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ static struct k_itimer * alloc_posix_timer(void)
441441
return tmr;
442442
if (unlikely(!(tmr->sigq = sigqueue_alloc()))) {
443443
kmem_cache_free(posix_timers_cache, tmr);
444-
tmr = NULL;
444+
return NULL;
445445
}
446446
memset(&tmr->sigq->info, 0, sizeof(siginfo_t));
447447
return tmr;

0 commit comments

Comments
 (0)