mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dan Carpenter" <error27@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: [patch] possible NULL deref in alloc_posix_timer()
Date: Mon, 22 Sep 2008 12:32:49 +0300	[thread overview]
Message-ID: <a63d67fe0809220232w1679f074i33629bf37a47f579@mail.gmail.com> (raw)

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;

                 reply	other threads:[~2008-09-22  9:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a63d67fe0809220232w1679f074i33629bf37a47f579@mail.gmail.com \
    --to=error27@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®