---
tests/xml2vmxtest.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/xml2vmxtest.c b/tests/xml2vmxtest.c
index 653ab6c..c578109 100644
--- a/tests/xml2vmxtest.c
+++ b/tests/xml2vmxtest.c
@@ -193,8 +193,9 @@ testFormatVMXFileName(const char *src, void *opaque ATTRIBUTE_UNUSED)
directoryAndFileName += strspn(directoryAndFileName, " ");
}
- virAsprintf(&absolutePath, "/vmfs/volumes/%s/%s", datastoreName,
- directoryAndFileName);
+ if (virAsprintf(&absolutePath, "/vmfs/volumes/%s/%s",
datastoreName,
+ directoryAndFileName) < 0)
+ goto cleanup;
} else if (STRPREFIX(src, "/")) {
/* Found absolute path */
absolutePath = strdup(src);
--
1.7.11.7