Re: [PATCH V8 5/6] make /proc/meminfo isolate with host through fuse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



于 2012年11月12日 16:48, Richard W.M. Jones 写道:
> On Mon, Nov 12, 2012 at 03:02:27PM +0800, Gao feng wrote:
>> +        len = strlen(new_line);
>> +
>> +        if (copied + len > size)
>> +            len = size - copied;
>> +
>> +        memcpy(buf + copied, new_line, len);
>> +        copied += len;
>> +        memset(line, 0, sizeof(line));
>> +        if (new_line != line)
>> +            VIR_FREE(new_line);
> 
> How about using the virBuffer API here?

Good point,will improve this.

> 
> Also you forgot to free 'line'.
> 

I will resend this one patch.

Thanks for your help!
Gao

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]