Skip to content
Commit d24846a4 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Helge Deller
Browse files

parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries

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: 73f368cf

 ("Kobject: change drivers/parisc/pdc_stable.c to use kobject_init_and_add")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 30f30899
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment