fish: Fix segfault in '-a' option.
authorRichard Jones <rjones@redhat.com>
Fri, 23 Apr 2010 13:13:42 +0000 (14:13 +0100)
committerRichard Jones <rjones@redhat.com>
Fri, 23 Apr 2010 13:15:12 +0000 (14:15 +0100)
This fixes a segfault in the guestfish -a option which you would
get when using guestfish 1.3.6.

fish/fish.c

index 4a7e70b..54989fc 100644 (file)
@@ -550,7 +550,8 @@ prepare_drives (struct drv *drv)
 {
   if (drv) {
     prepare_drives (drv->next);
-    prepare_drive (drv->filename, drv->data, drv->device);
+    if (drv->data)
+      prepare_drive (drv->filename, drv->data, drv->device);
   }
 }