From c142492e915f8186db6edafbd74a5ba1d37e7553 Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 17 Oct 2001 15:03:00 +0000 Subject: [PATCH] o Fix crash that Patrick reported --- driver/device-mapper/dm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/driver/device-mapper/dm.c b/driver/device-mapper/dm.c index abd58aaf9..900a413e3 100644 --- a/driver/device-mapper/dm.c +++ b/driver/device-mapper/dm.c @@ -878,8 +878,9 @@ int dm_deactivate(struct mapped_device *md) return -EPERM; } - close_devices(&md->map->devices); - md->map = 0; + if (md->map) + close_devices(&md->map->devices); + md->map = NULL; clear_bit(DM_ACTIVE, &md->state); wu;