Merge tag 'riscv-for-linus-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / drivers / scsi / iscsi_boot_sysfs.c
index e4857b7..a64abe3 100644 (file)
@@ -352,7 +352,7 @@ iscsi_boot_create_kobj(struct iscsi_boot_kset *boot_kset,
        boot_kobj->kobj.kset = boot_kset->kset;
        if (kobject_init_and_add(&boot_kobj->kobj, &iscsi_boot_ktype,
                                 NULL, name, index)) {
-               kfree(boot_kobj);
+               kobject_put(&boot_kobj->kobj);
                return NULL;
        }
        boot_kobj->data = data;