Re: [RFC PATCH 1B] credential-cache--daemon: close input before exit-ing

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

 



On Thu, Jul 07 2022, Ramsay Jones wrote:

> Signed-off-by: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxxx>
> ---
>  builtin/credential-cache--daemon.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/builtin/credential-cache--daemon.c b/builtin/credential-cache--daemon.c
> index 4c6c89ab0d..556393498f 100644
> --- a/builtin/credential-cache--daemon.c
> +++ b/builtin/credential-cache--daemon.c
> @@ -138,6 +138,7 @@ static void serve_one_client(FILE *in, FILE *out)
>  		 * process actually ends, which closes the socket and gives
>  		 * them EOF.
>  		 */
> +		fclose(in);
>  		exit(0);
>  	}
>  	else if (!strcmp(action.buf, "erase"))

This is called by a function that will also close stdout, shouldn't we
be closing it here?



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux