Re: [PATCH v3 20/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/secret/*

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

 



On 05/03/2013 08:53 AM, Michal Privoznik wrote:
> ---
>  src/secret/secret_driver.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Nice and short!   ACK.

> 
> diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
> index 377b9f4..5d1739f 100644
> --- a/src/secret/secret_driver.c
> +++ b/src/secret/secret_driver.c
> @@ -1097,9 +1097,8 @@ secretStateInitialize(bool privileged,
>      secretDriverLock(driverState);
>  
>      if (privileged) {
> -        base = strdup(SYSCONFDIR "/libvirt");
> -        if (base == NULL)
> -            goto out_of_memory;
> +        if (VIR_STRDUP(base, SYSCONFDIR "/libvirt") < 0)
> +            goto error;
>      } else {
>          base = virGetUserConfigDirectory();
>          if (!base)
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]