author | Catalin Marinas
<catalin.marinas@arm.com> 2009-10-09 09:30:34 UTC |
committer | Linus Torvalds
<torvalds@linux-foundation.org> 2009-10-09 20:28:47 UTC |
parent | c1bcd6b327a0c0d5077eb158a600947aac7d124a |
mm/kmemleak.c | +3 | -0 |
diff --git a/mm/kmemleak.c b/mm/kmemleak.c index a6175180d18..8bf765c4f58 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -834,11 +834,14 @@ static void early_alloc(struct early_log *log) rcu_read_lock(); object = create_object((unsigned long)log->ptr, log->size, log->min_count, GFP_ATOMIC); + if (!object) + goto out; spin_lock_irqsave(&object->lock, flags); for (i = 0; i < log->trace_len; i++) object->trace[i] = log->trace[i]; object->trace_len = log->trace_len; spin_unlock_irqrestore(&object->lock, flags); +out: rcu_read_unlock(); }