[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LRH.2.00.1806251541470.1881@gjva.wvxbf.pm>
Date: Mon, 25 Jun 2018 15:42:39 +0200 (CEST)
From: Jiri Kosina <jikos@...nel.org>
To: Petr Mladek <pmladek@...e.com>
cc: Namit Gupta <gupta.namit@...sung.com>,
sergey.senozhatsky@...il.com, rostedt@...dmis.org,
linux-kernel@...r.kernel.org, pankaj.m@...sung.com,
a.sahrawat@...sung.com, himanshu.m@...sung.com
Subject: Re: [PATCH] printk: remove unnecessary kmalloc() from syslog during
clear
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
Powered by blists - more mailing lists