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

From: David Miller
Date: Fri Aug 19 2011 - 01:04:40 EST


From: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/