Re: [PATCH v2] mmc: block: fix logical error to avoid memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Uffe,
    Thx for your guide. I'm on the way to work with community. I'll
	follow your suggestion next time.

B.R.
Changcheng

On 21:05 Mon 18 Dec, Ulf Hansson wrote:
> On 16 December 2017 at 16:15, Liu, Changcheng <changcheng.liu@xxxxxxxxx> wrote:
> > If the MMC_DRV_OP_GET_EXT_CSD request completes successfully, then
> > ext_csd must be freed, but in one case it was not. Fix that.
> >
> > Signed-off-by: Liu Changcheng <changcheng.liu@xxxxxxxxx>
> 
> Thanks, applied for next!
> 
> Next time, you may please preserve acks from previous versions,
> especially if the reviewer (Adrian in this case) says so.
> 
> Kind regards
> Uffe
> 
> >
> > diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> > index ccfa98a..b737a95 100644
> > --- a/drivers/mmc/core/block.c
> > +++ b/drivers/mmc/core/block.c
> > @@ -2623,6 +2623,7 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp)
> >
> >         if (n != EXT_CSD_STR_LEN) {
> >                 err = -EINVAL;
> > +               kfree(ext_csd);
> >                 goto out_free;
> >         }
> >
> > --
> > 2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux