Details
-
Bug
-
Resolution: Fixed
-
Minor
-
Lustre 2.8.0
-
3
-
9223372036854775807
Description
Highlighted by smatch:
init_obdclass has this nice code:
err = misc_register(&obd_psdev);
if (err) {
CERROR("cannot register %d err %d\n", OBD_DEV_MINOR, err);
return err;
}
...
err = obd_init_caches();
if (err)
return err;
err = class_procfs_init();
if (err)
return err;
err = lu_global_init();
if (err)
return err;
err = lu_capainfo_init();
if (err)
return err;
...
leaking reference to the just registered device.
We should really be freeing it on all subsequent errors.