mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tty: vt: consolemap: Add missing kfree() in con_do_clear_unimap()
@ 2022-03-03  2:06 Jianglei Nie
  2022-03-03  7:37 ` Greg KH
       [not found] ` <4a7fe3ca.68b6.17f6eacb952.Coremail.niejianglei2021@163.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Jianglei Nie @ 2022-03-03  2:06 UTC (permalink / raw)
  To: gregkh, jirislaby; +Cc: linux-kernel, Jianglei Nie

We should free p after con_release_unimap(p) like the call points of
con_release_unimap() do in the same file.

This patch adds the missing kfree() after con_release_unimap(p).

Signed-off-by: Jianglei Nie <niejianglei2021@163.com>
---
 drivers/tty/vt/consolemap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c
index d815ac98b39e..5279c3d27720 100644
--- a/drivers/tty/vt/consolemap.c
+++ b/drivers/tty/vt/consolemap.c
@@ -520,6 +520,7 @@ static int con_do_clear_unimap(struct vc_data *vc)
 		p->refcount++;
 		p->sum = 0;
 		con_release_unimap(p);
+		kfree(p);
 	}
 	return 0;
 }
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-25  7:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03  2:06 [PATCH] tty: vt: consolemap: Add missing kfree() in con_do_clear_unimap() Jianglei Nie
2022-03-03  7:37 ` Greg KH
     [not found] ` <4a7fe3ca.68b6.17f6eacb952.Coremail.niejianglei2021@163.com>
2022-03-09 13:40   ` Greg KH
2022-04-22 13:44   ` Greg KH
2022-04-25  6:59   ` Jiri Slaby
2022-04-25  7:09     ` Jiri Slaby

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®