X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Flvm.c;h=326b583017f47227c6b332858bdffccfd044019c;hp=6946d58454abd9b05abdd427debe24d0210f9456;hb=6f5c3984a7ddfc111287e2ec214ba823db737db4;hpb=4f7cc37e5f4a209773062d67e5f61a81f7800fc8 diff --git a/daemon/lvm.c b/daemon/lvm.c index 6946d58..326b583 100644 --- 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;