Re: [PATCH 2/2] afs: Fix afs_xattr_get_yfs() to not try freeing an error value

From: David Howells
Date: Sun May 12 2019 - 14:12:25 EST


walter harms <wharms@xxxxxx> wrote:

> > + ret = dsize;
> > + if (size > 0) {
> > + if (dsize > size) {
> > + ret = -ERANGE;
> > + goto error_key;
> > }
> > + memcpy(buffer, data, dsize);
> > }
> >
>
> i am confused: if size is <= 0 then the error is in dsize ?

See this bit, before that hunk:

> + if (ret < 0)
> + goto error_key;

David