On Thu, Jan 03, 2013 at 02:16:20PM -0500, John Ferlan wrote:
---
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);
ACK
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|