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

David Howells
2019-05-12T18:10:45Z

walter harms <wharms@bfs.de> 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