release proplib iterator in failure paths.
This commit is contained in:
parent
57f4756003
commit
be9a4c1bae
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: dm_ioctl.c,v 1.27 2013/10/18 19:56:30 christos Exp $ */
|
/* $NetBSD: dm_ioctl.c,v 1.28 2013/12/24 22:14:07 mlelstv Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||||
|
@ -712,6 +712,7 @@ dm_table_load_ioctl(prop_dictionary_t dm_dict)
|
||||||
|
|
||||||
if ((dmv = dm_dev_lookup(name, uuid, minor)) == NULL) {
|
if ((dmv = dm_dev_lookup(name, uuid, minor)) == NULL) {
|
||||||
DM_REMOVE_FLAG(flags, DM_EXISTS_FLAG);
|
DM_REMOVE_FLAG(flags, DM_EXISTS_FLAG);
|
||||||
|
prop_object_iterator_release(iter);
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
}
|
}
|
||||||
aprint_debug("Loading table to device: %s--%d\n", name,
|
aprint_debug("Loading table to device: %s--%d\n", name,
|
||||||
|
@ -743,12 +744,14 @@ dm_table_load_ioctl(prop_dictionary_t dm_dict)
|
||||||
((target = dm_target_autoload(type)) == NULL)) {
|
((target = dm_target_autoload(type)) == NULL)) {
|
||||||
dm_table_release(&dmv->table_head, DM_TABLE_INACTIVE);
|
dm_table_release(&dmv->table_head, DM_TABLE_INACTIVE);
|
||||||
dm_dev_unbusy(dmv);
|
dm_dev_unbusy(dmv);
|
||||||
|
prop_object_iterator_release(iter);
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
}
|
}
|
||||||
if ((table_en = kmem_alloc(sizeof(dm_table_entry_t),
|
if ((table_en = kmem_alloc(sizeof(dm_table_entry_t),
|
||||||
KM_SLEEP)) == NULL) {
|
KM_SLEEP)) == NULL) {
|
||||||
dm_table_release(&dmv->table_head, DM_TABLE_INACTIVE);
|
dm_table_release(&dmv->table_head, DM_TABLE_INACTIVE);
|
||||||
dm_dev_unbusy(dmv);
|
dm_dev_unbusy(dmv);
|
||||||
|
prop_object_iterator_release(iter);
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
prop_dictionary_get_uint64(target_dict, DM_TABLE_START,
|
prop_dictionary_get_uint64(target_dict, DM_TABLE_START,
|
||||||
|
@ -791,6 +794,7 @@ dm_table_load_ioctl(prop_dictionary_t dm_dict)
|
||||||
|
|
||||||
dm_dev_unbusy(dmv);
|
dm_dev_unbusy(dmv);
|
||||||
dm_target_unbusy(target);
|
dm_target_unbusy(target);
|
||||||
|
prop_object_iterator_release(iter);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
last_table = table_en;
|
last_table = table_en;
|
||||||
|
|
Loading…
Reference in New Issue