Messages in this thread | | | Date | Mon, 25 Jun 2018 15:42:39 +0200 (CEST) | From | Jiri Kosina <> | 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
| |