]> Git Repo - linux.git/commit
consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c
authorGen Zhang <[email protected]>
Thu, 23 May 2019 00:34:52 +0000 (08:34 +0800)
committerGreg Kroah-Hartman <[email protected]>
Fri, 24 May 2019 08:04:44 +0000 (10:04 +0200)
commit84ecc2f6eb1cb12e6d44818f94fa49b50f06e6ac
treee83742a61aa97de1836e24e3b88dd3b562967fe2
parent06aaa3d066db87e8478522d910285141d44b1e58
consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c

In function con_insert_unipair(), when allocation for p2 and p1[n]
fails, ENOMEM is returned, but previously allocated p1 is not freed,
remains as leaking memory. Thus we should free p1 as well when this
allocation fails.

Signed-off-by: Gen Zhang <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/tty/vt/consolemap.c
This page took 0.054544 seconds and 4 git commands to generate.