summaryrefslogtreecommitdiff
path: root/net/caif
diff options
context:
space:
mode:
authorMiaoqian Lin <linmq006@gmail.com>2022-02-04 01:30:08 +0800
committerWei Liu <wei.liu@kernel.org>2022-02-07 17:52:22 +0000
commit8bc69f86328e87a0ffa79438430cc82f3aa6a194 (patch)
tree47d6730bbb16206ae674374ea22223bccd583d83 /net/caif
parent3149efcdf2c6314420c418dfc94de53bfd076b1f (diff)
Drivers: hv: vmbus: Fix memory leak in vmbus_add_channel_kobj
kobject_init_and_add() takes reference even when it fails. According to the doc of kobject_init_and_add(): If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Fix memory leak by calling kobject_put(). Fixes: c2e5df616e1a ("vmbus: add per-channel sysfs info") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Reviewed-by: Juan Vazquez <juvazq@linux.microsoft.com> Link: https://lore.kernel.org/r/20220203173008.43480-1-linmq006@gmail.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'net/caif')
0 files changed, 0 insertions, 0 deletions