[Pkg-libvirt-commits] [SCM] Libguestfs Debian packaging branch, experimental, updated. debian/1%1.21.40-1
Richard W.M. Jones
rjones at redhat.com
Sat Jun 1 11:04:38 UTC 2013
The following commit has been merged in the experimental branch:
commit 7a9ebd757cca0ec22fd730703bed16005ebfb6a4
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Fri May 10 14:23:08 2013 +0100
src/inspect-fs.c: Don't segfault if internal_parse_mountable returns NULL (RHBZ#961812).
diff --git a/src/inspect-fs.c b/src/inspect-fs.c
index 55e3cd8..a8dc05c 100644
--- a/src/inspect-fs.c
+++ b/src/inspect-fs.c
@@ -93,6 +93,8 @@ guestfs___check_for_filesystem_on (guestfs_h *g, const char *mountable)
CLEANUP_FREE char *vfs_type = NULL;
int is_swap, r;
struct inspect_fs *fs;
+ CLEANUP_FREE_INTERNAL_MOUNTABLE struct guestfs_internal_mountable *m = NULL;
+ int whole_device = 0;
/* Get vfs-type in order to check if it's a Linux(?) swap device.
* If there's an error we should ignore it, so to do that we have to
@@ -114,11 +116,11 @@ guestfs___check_for_filesystem_on (guestfs_h *g, const char *mountable)
return 0;
}
- CLEANUP_FREE_INTERNAL_MOUNTABLE struct guestfs_internal_mountable *m =
- guestfs_internal_parse_mountable (g, mountable);
+ m = guestfs_internal_parse_mountable (g, mountable);
+ if (m == NULL)
+ return -1;
/* If it's a whole device, see if it is an install ISO. */
- int whole_device = 0;
if (m->im_type == MOUNTABLE_DEVICE) {
whole_device = guestfs_is_whole_device (g, m->im_device);
if (whole_device == -1) {
--
Libguestfs Debian packaging
More information about the Pkg-libvirt-commits
mailing list