diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-09-22 11:59:58 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-09-22 11:59:58 +0100 |
commit | 734b2d2483f0b0e6c3f4e0427dcde19877355f0f (patch) | |
tree | 6cfb693b2fed8ec0990bb70f87d1effb8669ec1e | |
parent | 460aa67118656e7bb53d2d04c70e9ee3a301c076 (diff) | |
download | libguestfs-734b2d2483f0b0e6c3f4e0427dcde19877355f0f.tar.gz libguestfs-734b2d2483f0b0e6c3f4e0427dcde19877355f0f.tar.xz libguestfs-734b2d2483f0b0e6c3f4e0427dcde19877355f0f.zip |
fish: Fix segfault in free_drives() function.
This updates commit 8ea62c8d7f3f7f7e4057b93105cf979271aa13f4
so it doesn't try to free the optarg (stack-allocated) strings.
-rw-r--r-- | fish/fish.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fish/fish.c b/fish/fish.c index 6192860b..43798458 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -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); |