LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Gen Zhang <blackgod016574@gmail.com>
Cc: jslaby@suse.com, keescook@chromium.org, khorenko@virtuozzo.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] consolemap: Fix a memory leaking bug in con_insert_unipair()
Date: Fri, 24 May 2019 10:02:00 +0200
Message-ID: <20190524080200.GA19609@kroah.com> (raw)
In-Reply-To: <20190524021932.GA4866@zhanggen-UX430UQ>

On Fri, May 24, 2019 at 10:19:32AM +0800, Gen Zhang wrote:
> 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 <blackgod016574@gmail.com>
> Reviewed-by: Kees Cook <keescook@chromium.org>

Any reason you keep dropping me from this thread?

It's as if you don't want me to apply the patch :(

greg k-h

  reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21  9:29 [PATCH] consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c Gen Zhang
2019-05-21 20:44 ` Kees Cook
2019-05-22  1:50   ` Gen Zhang
2019-05-22 20:54     ` Kees Cook
2019-05-23  0:29       ` Gen Zhang
2019-05-23  0:34       ` [PATCH v2] " Gen Zhang
2019-05-23 16:54         ` Kees Cook
2019-05-24  2:14           ` Gen Zhang
2019-05-24  2:19           ` [PATCH v2] consolemap: Fix a memory leaking bug in con_insert_unipair() Gen Zhang
2019-05-24  8:02             ` Greg KH [this message]
2019-05-24  9:37           ` [PATCH v2] consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c Jon Hunter
2019-05-25  6:04             ` Kees Cook

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=20190524080200.GA19609@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=blackgod016574@gmail.com \
    --cc=jslaby@suse.com \
    --cc=keescook@chromium.org \
    --cc=khorenko@virtuozzo.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git
	git clone --mirror https://lore.kernel.org/lkml/10 lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git