Re: [PATCH] setcifsacl.c: fix a bug of goto setcifsacl_facenum_ret

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

 



On Fri, 12 Apr 2013 16:58:49 +0800
Peng Haitao <penght@xxxxxxxxxxxxxx> wrote:

> setcifsacl_facenum_ret: is called only if attrlen is equal to -1.
> 
> Signed-off-by: Peng Haitao <penght@xxxxxxxxxxxxxx>
> ---
>  setcifsacl.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/setcifsacl.c b/setcifsacl.c
> index 67dd29c..4b38459 100644
> --- a/setcifsacl.c
> +++ b/setcifsacl.c
> @@ -822,9 +822,10 @@ cifsacl:
>  		goto setcifsacl_action_ret;
>  
>  	attrlen = setxattr(filename, ATTRNAME, ntsdptr, bufsize, 0);
> -	if (attrlen == -1)
> +	if (attrlen == -1) {
>  		printf("%s: setxattr error: %s\n", __func__, strerror(errno));
> -	goto setcifsacl_facenum_ret;
> +		goto setcifsacl_facenum_ret;
> +	}
>  
>  	exit_plugin(plugin_handle);
>  	return 0;

Well spotted -- will merge in a day or so if no one objects.

Thanks,
-- 
Jeff Layton <jlayton@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux