mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: sylphrenadin@gmail.com
Cc: Julia.Lawall@lip6.fr, UNGLinuxDriver@microchip.com,
	vladimir.oltean@nxp.com, claudiu.manoil@nxp.com,
	alexandre.belloni@bootlin.com, andrew@lunn.ch,
	vivien.didelot@gmail.com, f.fainelli@gmail.com, kuba@kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ocelot: Add of_node_put() before return statement
Date: Mon, 24 Aug 2020 18:04:42 -0700 (PDT)	[thread overview]
Message-ID: <20200824.180442.1290741945932081611.davem@davemloft.net> (raw)
In-Reply-To: <20200823135245.5857-1-sylphrenadin@gmail.com>

From: Sumera Priyadarsini <sylphrenadin@gmail.com>
Date: Sun, 23 Aug 2020 19:22:45 +0530

> Every iteration of for_each_available_child_of_node() decrements
> the reference count of the previous node, however when control
> is transferred from the middle of the loop, as in the case of
> a return or break or goto, there is no decrement thus ultimately
> resulting in a memory leak.
> 
> Fix a potential memory leak in felix.c by inserting of_node_put()
> before the return statement.
> 
> Issue found with Coccinelle.
> 
> Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>

Applied.

      reply	other threads:[~2020-08-25  1:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-23 13:52 Sumera Priyadarsini
2020-08-25  1:04 ` David Miller [this message]

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=20200824.180442.1290741945932081611.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Julia.Lawall@lip6.fr \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sylphrenadin@gmail.com \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®