diff options
| author | Jack Wang <jinpu.wang@cloud.ionos.com> | 2020-12-10 11:18:21 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-30 11:53:57 +0100 |
| commit | 1b75aea3e360f5e660612b6c25a54cb16c313b23 (patch) | |
| tree | 241d358cfe16640eae788f57254061d60c2dbb08 /include/uapi/linux/devlink.h | |
| parent | 996ce53a2af75bf7d59e2515b475b7c7cc45d2b5 (diff) | |
block/rnbd-clt: Fix possible memleak
[ Upstream commit 46067844efdb8275ade705923120fc5391543b53 ]
In error case, we do not free the memory for blk_symlink_name.
Do it by free the memory in error case, and set to NULL
afterwards.
Also fix the condition in rnbd_clt_remove_dev_symlink.
Fixes: 64e8a6ece1a5 ("block/rnbd-clt: Dynamically alloc buffer for pathname & blk_symlink_name")
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Reviewed-by: Md Haris Iqbal <haris.iqbal@cloud.ionos.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/uapi/linux/devlink.h')
0 files changed, 0 insertions, 0 deletions
