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

Re: [libvirt] [PATCH] Avoid calling virStorageFileIsSharedFS with NULL



On 06/29/2010 02:41 AM, Daniel Veillard wrote:
> On Mon, Jun 28, 2010 at 11:58:43PM -0400, Laine Stump wrote:
>>  On 06/28/2010 11:54 PM, Laine Stump wrote:
>>> From: Laine Stump<laine redhat com>
>>>
>>> This code was just recently added (by me) and didn't account for the
>>> fact that stdin_path is sometimes NULL. If it's NULL, and
>>> SetSecurityAllLabel fails, a segfault would result.

>>>          driver->securityDriver->domainSetSecurityAllLabel(vm, stdin_path)<  0) {
>>> -        if (virStorageFileIsSharedFS(stdin_path) != 1)
>>> +        if (stdin_path&&  virStorageFileIsSharedFS(stdin_path) != 1)

>   ACK anyway :-)

Meanwhile, why is virStorageFileIsSharedFS not marked with
ATTRIBUTE_NONNULL(1) in stoarge_file.h?

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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