git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 1.5.23.
[libguestfs.git]
/
daemon
/
parted.c
diff --git
a/daemon/parted.c
b/daemon/parted.c
index
89cc0d6
..
068384e
100644
(file)
--- a/
daemon/parted.c
+++ b/
daemon/parted.c
@@
-378,6
+378,14
@@
do_part_get_parttype (const char *device)
}
free_strings (lines);
}
free_strings (lines);
+
+ /* If "loop" return an error (RHBZ#634246). */
+ if (STREQ (r, "loop")) {
+ free (r);
+ reply_with_error ("not a partitioned device");
+ return NULL;
+ }
+
return r;
}
else {
return r;
}
else {
@@
-406,6
+414,13
@@
do_part_get_parttype (const char *device)
return NULL;
}
return NULL;
}
+ /* If "loop" return an error (RHBZ#634246). */
+ if (STREQ (p, "loop")) {
+ free (p);
+ reply_with_error ("not a partitioned device");
+ return NULL;
+ }
+
return p; /* caller frees */
}
}
return p; /* caller frees */
}
}