[libvirt] [PATCH 08/10] Check and handle error for virAsprintf() calls.
Eric Blake
eblake at redhat.com
Fri Jan 4 18:07:52 UTC 2013
On 01/03/2013 12:37 PM, Daniel P. Berrange wrote:
> 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
I'm squashing 7 and 8 into one patch, since they both touch the tests/
directory. I've now pushed 6-8 (Dan asked for a v2 of patch 5).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130104/756af7c0/attachment-0001.sig>
More information about the libvir-list
mailing list