From: Jiri Kosina <jikos@kernel.org>
To: Petr Mladek <pmladek@suse.com>
Cc: Namit Gupta <gupta.namit@samsung.com>,
sergey.senozhatsky@gmail.com, rostedt@goodmis.org,
linux-kernel@vger.kernel.org, pankaj.m@samsung.com,
a.sahrawat@samsung.com, himanshu.m@samsung.com
Subject: Re: [PATCH] printk: remove unnecessary kmalloc() from syslog during clear
Date: Mon, 25 Jun 2018 15:42:39 +0200 (CEST) [thread overview]
Message-ID: <alpine.LRH.2.00.1806251541470.1881@gjva.wvxbf.pm> (raw)
In-Reply-To: <20180625133705.7zsg2rkw4xtyg6ie@pathway.suse.cz>
On Mon, 25 Jun 2018, Petr Mladek wrote:
> @@ -1426,7 +1428,8 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
> }
> logbuf_unlock_irq();
>
> - kfree(text);
> + if (text)
> + kfree(text);
Nit: you don't need to duplicate the check kfree() is doing anyway.
--
Jiri Kosina
SUSE Labs
next prev parent reply other threads:[~2018-06-25 13:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180620135951epcas5p3bd2a8f25ec689ca333bce861b527dba2@epcas5p3.samsung.com>
2018-06-20 13:56 ` Namit Gupta
2018-06-20 14:16 ` Steven Rostedt
2018-06-21 6:58 ` Sergey Senozhatsky
2018-06-25 13:37 ` Petr Mladek
2018-06-25 13:42 ` Jiri Kosina [this message]
2018-06-25 14:35 ` Sergey Senozhatsky
2018-06-25 14:37 ` Steven Rostedt
2018-06-25 14:44 ` Sergey Senozhatsky
2018-06-26 12:43 ` Petr Mladek
2018-06-26 14:39 ` Steven Rostedt
2018-06-27 15:06 ` Petr Mladek
2018-07-09 11:48 ` Petr Mladek
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=alpine.LRH.2.00.1806251541470.1881@gjva.wvxbf.pm \
--to=jikos@kernel.org \
--cc=a.sahrawat@samsung.com \
--cc=gupta.namit@samsung.com \
--cc=himanshu.m@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.m@samsung.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
/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®