git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f7cc37
)
Fix unchecked malloc (Jim Meyering).
author
Richard Jones
<rjones@redhat.com>
Thu, 30 Apr 2009 12:36:26 +0000
(13:36 +0100)
committer
Richard Jones
<rjones@redhat.com>
Thu, 30 Apr 2009 12:36:26 +0000
(13:36 +0100)
daemon/lvm.c
patch
|
blob
|
history
diff --git
a/daemon/lvm.c
b/daemon/lvm.c
index
6946d58
..
326b583
100644
(file)
--- a/
daemon/lvm.c
+++ b/
daemon/lvm.c
@@
-197,6
+197,10
@@
do_vgcreate (const char *volgroup, char * const* const physvols)
argc = count_strings (physvols) + 3;
argv = malloc (sizeof (char *) * (argc + 1));
+ if (argv == NULL) {
+ reply_with_perror ("malloc");
+ return -1;
+ }
argv[0] = "/sbin/lvm";
argv[1] = "vgcreate";
argv[2] = volgroup;