Re: [Patch] Scm: Remove unnecessary pid & credential references in Unix socket's send and receive path

David Miller
2011-08-19T05:04:32Z

Date: Wed, 17 Aug 2011 16:56:14 -0700

> +static __inline__ void scm_release(struct scm_cookie *scm)
> +{
> + /* keep ref on pid and cred */
> + scm->pid = NULL;
> + scm->cred = NULL;
> + if (scm && scm->fp)
> + __scm_destroy(scm);
> +}

After dereferencing scm-> already, it seems a big redundant to test
it subsequently against NULL.