summaryrefslogtreecommitdiff
path: root/sys/dev/dm/dm_ioctl.c
diff options
context:
space:
mode:
authormlelstv <mlelstv@NetBSD.org>2013-12-24 22:14:07 +0000
committermlelstv <mlelstv@NetBSD.org>2013-12-24 22:14:07 +0000
commit398226084193909f4efc8b5806f16bc0a6169ecb (patch)
treeef884cc1ca19cc580b41e878922875f7e945f45b /sys/dev/dm/dm_ioctl.c
parentf80dbdee64b334057904298c76df9cc55f45fb24 (diff)
release proplib iterator in failure paths.
Diffstat (limited to 'sys/dev/dm/dm_ioctl.c')
-rw-r--r--sys/dev/dm/dm_ioctl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/dm/dm_ioctl.c b/sys/dev/dm/dm_ioctl.c
index a96c1d826e1..ebd81098412 100644
--- a/sys/dev/dm/dm_ioctl.c
+++ b/sys/dev/dm/dm_ioctl.c
@@ -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.
@@ -712,6 +712,7 @@ dm_table_load_ioctl(prop_dictionary_t dm_dict)
if ((dmv = dm_dev_lookup(name, uuid, minor)) == NULL) {
DM_REMOVE_FLAG(flags, DM_EXISTS_FLAG);
+ prop_object_iterator_release(iter);
return ENOENT;
}
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)) {
dm_table_release(&dmv->table_head, DM_TABLE_INACTIVE);
dm_dev_unbusy(dmv);
+ prop_object_iterator_release(iter);
return ENOENT;
}
if ((table_en = kmem_alloc(sizeof(dm_table_entry_t),
KM_SLEEP)) == NULL) {
dm_table_release(&dmv->table_head, DM_TABLE_INACTIVE);
dm_dev_unbusy(dmv);
+ prop_object_iterator_release(iter);
return ENOMEM;
}
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_target_unbusy(target);
+ prop_object_iterator_release(iter);
return ret;
}
last_table = table_en;