Matthew Booth
2012-Apr-17 09:18 UTC
[Libguestfs] [PATCH] Don't abort inspection if mdadm.conf ARRAY doesn't have a uuid
--- src/inspect_fs_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inspect_fs_unix.c b/src/inspect_fs_unix.c index 1ef4ca4..5695adc 100644 --- a/src/inspect_fs_unix.c +++ b/src/inspect_fs_unix.c @@ -1113,7 +1113,7 @@ map_md_devices(guestfs_h *g, Hash_table **map) free(uuid_path); if (!uuid) { free(dev); - goto error; + continue; } /* Parse the uuid into an md_uuid structure so we can look it up in the -- 1.7.10
Richard W.M. Jones
2012-Apr-17 15:07 UTC
[Libguestfs] [PATCH] Don't abort inspection if mdadm.conf ARRAY doesn't have a uuid
On Tue, Apr 17, 2012 at 10:18:45AM +0100, Matthew Booth wrote:> --- > src/inspect_fs_unix.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/inspect_fs_unix.c b/src/inspect_fs_unix.c > index 1ef4ca4..5695adc 100644 > --- a/src/inspect_fs_unix.c > +++ b/src/inspect_fs_unix.c > @@ -1113,7 +1113,7 @@ map_md_devices(guestfs_h *g, Hash_table **map) > free(uuid_path); > if (!uuid) { > free(dev); > - goto error; > + continue;Looks OK. Does it run under valgrind ('make extra-tests')? That's a good way to catch memory leaks and other problems in these complex and hot inspection paths. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
Possibly Parallel Threads
- [PATCH] rename local variable to avoid clash with match macro
- [PATCH 0/2] MD device inspection
- [PATCH 0/2] handle MD devices in fstab
- [PATCH] NFC: Cleanup iteration over fstab entries in inspect_fs_unix.c
- [PATCH 1/3] build: Add more suppressions for valgrind tests