All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: wei.liu2@citrix.com, Daniel De Graaf <dgdegra@tycho.nsa.gov>,
	ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH] loadpolicy: only close polFd if it is valid
Date: Thu, 11 Feb 2016 11:20:10 +0000	[thread overview]
Message-ID: <20160211112010.GF17384@citrix.com> (raw)
In-Reply-To: <1455121959-31657-1-git-send-email-ian.campbell@citrix.com>

On Wed, Feb 10, 2016 at 04:32:39PM +0000, Ian Campbell wrote:
> It can be -1 at this point.
> 
> CID 1055562
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
>  tools/flask/utils/loadpolicy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/flask/utils/loadpolicy.c b/tools/flask/utils/loadpolicy.c
> index 47b5139..76710a2 100644
> --- a/tools/flask/utils/loadpolicy.c
> +++ b/tools/flask/utils/loadpolicy.c
> @@ -115,7 +115,7 @@ done:
>          if ( ret < 0 )
>              fprintf(stderr, "Unable to unmap policy memory: %s\n", strerror(errno));
>      }
> -    if ( polFd )
> +    if ( polFd >= 0 )
>          close(polFd);
>      if ( xch )
>          xc_interface_close(xch);
> -- 
> 2.1.4
> 

  reply	other threads:[~2016-02-11 11:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 16:32 [PATCH] loadpolicy: only close polFd if it is valid Ian Campbell
2016-02-11 11:20 ` Wei Liu [this message]
2016-02-23 10:30   ` Ian Campbell
2016-02-29 15:49     ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160211112010.GF17384@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.