lkml.org 
[lkml]   [2008]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] possible NULL deref in alloc_posix_timer()
Found by static checker (http://repo.or.cz/w/smatch.git).
Compile tested.

Signed-off-by: Dan Carpenter <error27@gmail.com>

--- kernel/posix-timers.c.orig 2008-08-29 01:52:02.000000000 +0300
+++ kernel/posix-timers.c 2008-09-20 21:54:19.000000000 +0300
@@ -441,7 +441,7 @@
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;

\
 
 \ /
  Last update: 2008-09-22 11:35    [W:0.080 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site