summaryrefslogtreecommitdiffstats
path: root/fish/fish.h
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2010-09-21 19:40:23 +0100
committerRichard W.M. Jones <rjones@redhat.com>2010-09-21 19:51:22 +0100
commit8ea62c8d7f3f7f7e4057b93105cf979271aa13f4 (patch)
tree7bf525e6617ddc2f858513cd935222ae2f7b5679 /fish/fish.h
parente7f62742b6141fd19444fc0e191281777cd966f9 (diff)
downloadlibguestfs-8ea62c8d7f3f7f7e4057b93105cf979271aa13f4.tar.gz
libguestfs-8ea62c8d7f3f7f7e4057b93105cf979271aa13f4.tar.xz
libguestfs-8ea62c8d7f3f7f7e4057b93105cf979271aa13f4.zip
leak: Free list of drives and mountpoints in guestfish.
Previously the list of -a, -d, -m, -N parameters were leaked. This change frees them explicitly. This is not such an important fix since guestfish is a one-shot program, but it aids in finding other leaks in future. (Found by valgrind).
Diffstat (limited to 'fish/fish.h')
-rw-r--r--fish/fish.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fish/fish.h b/fish/fish.h
index 609cbc29..f6e1aeb9 100644
--- a/fish/fish.h
+++ b/fish/fish.h
@@ -124,7 +124,7 @@ extern int run_more (const char *cmd, int argc, char *argv[]);
struct prep_data {
const struct prep *prep;
const char *orig_type_string;
- const char **params;
+ char **params;
};
typedef struct prep_data prep_data;
extern void list_prepared_drives (void);
@@ -133,6 +133,7 @@ extern prep_data *create_prepared_file (const char *type_string,
extern void prepare_drive (const char *filename, prep_data *data,
const char *device);
extern void prep_error (prep_data *data, const char *filename, const char *fs, ...) __attribute__((noreturn, format (printf,3,4)));
+extern void free_prep_data (prep_data *data);
/* in prep_lv.c */
extern int vg_lv_parse (const char *device, char **vg, char **lv);