[libvirt PATCH] util: virNetDevTapCreate: initialize fd to -1

Laine Stump laine at redhat.com
Mon Sep 14 17:03:51 UTC 2020


derp! :-O

<raises hand in shame>

On 9/14/20 7:03 AM, Ján Tomko wrote:
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> Fixes: 95089f481e003d971fe0a082018216c58c1b80e5
> ---
> Pushed as trivial.
>
>   src/util/virnetdevtap.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c
> index ab5959c646..cbce5c71b7 100644
> --- a/src/util/virnetdevtap.c
> +++ b/src/util/virnetdevtap.c
> @@ -322,7 +322,7 @@ int virNetDevTapCreate(char **ifname,
>       size_t i = 0;
>       struct ifreq ifr;
>       int ret = -1;
> -    int fd = 0;
> +    int fd = -1;
>   
>       virMutexLock(&virNetDevTapCreateMutex);
>   





More information about the libvir-list mailing list