diff --git a/sys/dev/dm/dm_ioctl.c b/sys/dev/dm/dm_ioctl.c index 3ae5d301ceb6..8f66da08ed1b 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.29 2014/10/02 21:29:44 justin Exp $ */ +/* $NetBSD: dm_ioctl.c,v 1.30 2015/05/10 14:08:54 christos Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -774,7 +774,7 @@ dm_table_load_ioctl(prop_dictionary_t dm_dict) prop_dictionary_get_cstring(target_dict, DM_TABLE_PARAMS, (char **) &str); - if (SLIST_EMPTY(tbl)) + if (SLIST_EMPTY(tbl) || last_table == NULL) /* insert this table to head */ SLIST_INSERT_HEAD(tbl, table_en, next); else