mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
fish: Fix segfault in free_drives() function.
This updates commit 8ea62c8d7f
so it doesn't try to free the optarg (stack-allocated) strings.
This commit is contained in:
@@ -701,8 +701,8 @@ free_drives (struct drv *drv)
|
||||
free_drives (drv->next);
|
||||
|
||||
switch (drv->type) {
|
||||
case drv_a: free (drv->a.filename); break;
|
||||
case drv_d: free (drv->d.guest); break;
|
||||
case drv_a: /* a.filename is optarg, don't free it */ break;
|
||||
case drv_d: /* d.filename is optarg, don't free it */ break;
|
||||
case drv_N:
|
||||
free (drv->N.filename);
|
||||
free (drv->N.device);
|
||||
|
||||
Reference in New Issue
Block a user