[libvirt] sysinfo: fix lack of error check in virSysinfoFormat().
Eric Blake
eblake at redhat.com
Mon Jun 27 15:44:08 UTC 2011
On 06/27/2011 04:12 AM, Daniel P. Berrange wrote:
> On Mon, Jun 27, 2011 at 04:40:56PM +0900, Minoru Usui wrote:
>> Fix lack of error check in virSysinfoFormat().
>>
>> Signed-off-by: Minoru Usui <usui at mxm.nes.nec.co.jp>
>> ---
>> src/util/sysinfo.c | 5 +++++
>> 1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/util/sysinfo.c b/src/util/sysinfo.c
>> index 31ebdc2..bff1cb8 100644
>> --- a/src/util/sysinfo.c
>> +++ b/src/util/sysinfo.c
>> @@ -796,6 +796,11 @@ virSysinfoFormat(virSysinfoDefPtr def, const char *prefix)
>>
>> virBufferAsprintf(&buf, "%s</sysinfo>\n", prefix);
>>
>> + if (virBufferError(&buf)) {
>> + virReportOOMError();
>> + return NULL;
>> + }
>> +
>> return virBufferContentAndReset(&buf);
>> }
>
> ACK
Pushed.
--
Eric Blake eblake at redhat.com +1-801-349-2682
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/20110627/649dd7cb/attachment-0001.sig>
More information about the libvir-list
mailing list