diff options
| author | Johannes Thumshirn <jthumshirn@suse.de> | 2016-09-30 14:39:17 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-01 09:46:40 +0100 |
| commit | 63238079b4800af2d650ebbc0a215fb2a0b004e4 (patch) | |
| tree | d2a000b86160a5e8439ccb64844ec53fc6015a46 /include/linux/debugobjects.h | |
| parent | 4dceeae8b863e880345e81975cd995ab372d95e3 (diff) | |
cw1200: Don't leak memory if krealloc failes
commit 9afdd6128c39f42398041bb2e017d8df0dcebcd1 upstream.
The call to krealloc() in wsm_buf_reserve() directly assigns the newly
returned memory to buf->begin. This is all fine except when krealloc()
failes we loose the ability to free the old memory pointed to by
buf->begin. If we just create a temporary variable to assign memory to
and assign the memory to it we can mitigate the memory leak.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
