lkml.org 
[lkml]   [2016]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/3] pinctrl: sunxi: Don't leak memory in case krealloc() failes
On Fri, Sep 30, 2016 at 2:14 PM, Johannes Thumshirn <jthumshirn@suse.de> 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@suse.de>

Patch applied.

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2016-10-10 10:44    [W:0.053 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site