]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Check return on mkdir for LOCKSPACE_DIR
authorJohn Ferlan <jferlan@redhat.com>
Thu, 3 Jan 2013 19:16:18 +0000 (14:16 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 4 Jan 2013 17:57:09 +0000 (10:57 -0700)
tests/virlockspacetest.c

index 8673700bc2779eb67a65e75b17893130e32368da..76783960adcc53ff27ee686979d1755b2fba37e9 100644 (file)
@@ -293,7 +293,8 @@ static int testLockSpaceResourceLockPath(const void *args ATTRIBUTE_UNUSED)
 
     lockspace = virLockSpaceNew(NULL);
 
-    mkdir(LOCKSPACE_DIR, 0700);
+    if (mkdir(LOCKSPACE_DIR, 0700) < 0)
+        goto cleanup;
 
     if (virLockSpaceCreateResource(lockspace, LOCKSPACE_DIR "/foo") < 0)
         goto cleanup;