diff options
| author | Navid Emamdoost <navid.emamdoost@gmail.com> | 2019-09-23 15:09:58 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-01 09:17:38 +0100 |
| commit | 344966da99c962bea479298e4d3744e0c6a513f1 (patch) | |
| tree | de74df81fdec692a8a2f30e0afd6fb8fe9347654 /include/linux/node.h | |
| parent | ed7a3dde0aa224051c6455fce3755bf48c062178 (diff) | |
nbd: prevent memory leak
commit 03bf73c315edca28f47451913177e14cd040a216 upstream.
In nbd_add_socket when krealloc succeeds, if nsock's allocation fail the
reallocted memory is leak. The correct behaviour should be assigning the
reallocted memory to config->socks right after success.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/node.h')
0 files changed, 0 insertions, 0 deletions
