Re: [PATCH 3/3] pinctrl: sunxi: Don't leak memory in case krealloc() failes

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

 



On Fri, Sep 30, 2016 at 2:14 PM, Johannes Thumshirn <jthumshirn@xxxxxxx> wrote:

> If krealloc() fails there's no way of freeing the memory previously allocated
> for pctl->functions as it is overwritten by krealloc()'s return value. Fix
> this by assigning the return value to a temporary variable first so we can do
> error handling (which we didn't do at all before).
>
> Signed-off-by: Johannes Thumshirn <jthumshirn@xxxxxxx>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux