All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Zaman <jason@perfinion.com>
To: Jan Zarsky <jzarsky@redhat.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: [PATCH] libsemanage: free genhomedircon fallback user
Date: Wed, 8 Nov 2017 14:58:59 +0800	[thread overview]
Message-ID: <20171108065859.GA9205@meriadoc.perfinion.com> (raw)
In-Reply-To: <20171106153530.5390-1-jzarsky@redhat.com>

On Mon, Nov 06, 2017 at 04:35:30PM +0100, Jan Zarsky wrote:
> Function semanage_genhomedircon() adds fallback user and function
> setup_fallback_user() may add another one. But only one fallback
> user is freed. Make sure to free all fallback users in
> semanage_genhomedircon().
> 
> Signed-off-by: Jan Zarsky <jzarsky@redhat.com>

Looks good to me,
merged, thanks :)
> ---
>  libsemanage/src/genhomedircon.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libsemanage/src/genhomedircon.c b/libsemanage/src/genhomedircon.c
> index 27a269ea..d09d82ff 100644
> --- a/libsemanage/src/genhomedircon.c
> +++ b/libsemanage/src/genhomedircon.c
> @@ -1385,7 +1385,9 @@ done:
>  	if (out != NULL)
>  		fclose(out);
>  
> -	pop_user_entry(&(s.fallback));
> +	while (s.fallback)
> +		pop_user_entry(&(s.fallback));
> +
>  	ignore_free();
>  
>  	return retval;
> -- 
> 2.14.3
> 
> 

      reply	other threads:[~2017-11-08  6:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 15:35 [PATCH] libsemanage: free genhomedircon fallback user Jan Zarsky
2017-11-08  6:58 ` Jason Zaman [this message]

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=20171108065859.GA9205@meriadoc.perfinion.com \
    --to=jason@perfinion.com \
    --cc=jzarsky@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    /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.