--- device-mapper.orig/lib/ioctl/libdm-iface.c 2007-08-02 15:58:25.000000000 -0700 +++ device-mapper/lib/ioctl/libdm-iface.c 2007-08-02 15:59:59.000000000 -0700 @@ -321,6 +321,9 @@ { struct target *t, *n; + if(!dmt) + return; /* NULL pointer would cause segfault */ + for (t = dmt->head; t; t = n) { n = t->next; dm_free(t->params);