Re: svn commit: r302550 - head/sys/rpc

2016-07-11 Thread Conrad Meyer
On Sun, Jul 10, 2016 at 11:58 PM, Garrett Cooper  wrote:
> Author: ngie
> Date: Mon Jul 11 06:58:24 2016
> New Revision: 302550
> URL: https://svnweb.freebsd.org/changeset/base/302550
>
> Log:
...
>   MFC after: 1 week
>   Reported by: Coverity
>   CID: 1007033, 1007344
>   Sponsored by: EMC / Isilon Storage Division

FYI, your svn commit message editor appears to be eating the tabs from
the commit template.

Best,
Conrad
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r302550 - head/sys/rpc

2016-07-11 Thread Garrett Cooper
Author: ngie
Date: Mon Jul 11 06:58:24 2016
New Revision: 302550
URL: https://svnweb.freebsd.org/changeset/base/302550

Log:
  Deobfuscate cleanup path in clnt_dg_create(..)
  
  Similar to r300836 and r301800, cl and cu will always be non-NULL as they're
  allocated using the mem_alloc routines, which always use
  `malloc(..., M_WAITOK)`.
  
  Deobfuscating the cleanup path fixes a leak where if cl was NULL and
  cu was not, cu would not be free'd, and also removes a duplicate test for
  cl not being NULL.
  
  MFC after: 1 week
  Reported by: Coverity
  CID: 1007033, 1007344
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/rpc/clnt_dg.c

Modified: head/sys/rpc/clnt_dg.c
==
--- head/sys/rpc/clnt_dg.c  Mon Jul 11 06:55:02 2016(r302549)
+++ head/sys/rpc/clnt_dg.c  Mon Jul 11 06:58:24 2016(r302550)
@@ -313,11 +313,9 @@ recheck_socket:
cl->cl_netid = NULL;
return (cl);
 err2:
-   if (cl) {
-   mem_free(cl, sizeof (CLIENT));
-   if (cu)
-   mem_free(cu, sizeof (*cu));
-   }
+   mem_free(cl, sizeof (CLIENT));
+   mem_free(cu, sizeof (*cu));
+
return (NULL);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"