Messages in this thread | | | Date | Thu, 18 Aug 2011 22:04:32 -0700 (PDT) | Subject | Re: [Patch] Scm: Remove unnecessary pid & credential references in Unix socket's send and receive path | From | David Miller <> |
| |
From: Tim Chen <tim.c.chen@linux.intel.com> 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.
| |