summaryrefslogtreecommitdiffstats
path: root/fish/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'fish/options.c')
-rw-r--r--fish/options.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fish/options.c b/fish/options.c
index 48c8e1c2..f6523898 100644
--- a/fish/options.c
+++ b/fish/options.c
@@ -43,6 +43,9 @@ add_drives (struct drv *drv, char next_drive)
if (drv) {
next_drive = add_drives (drv->next, next_drive);
+ free (drv->device);
+ drv->device = NULL;
+
if (asprintf (&drv->device, "/dev/sd%c", next_drive) == -1) {
perror ("asprintf");
exit (EXIT_FAILURE);