Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Sep 2012 03:14:18 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r240880 - in head: lib/libc/rpc sys/rpc
Message-ID:  <201209240314.q8O3EIXq031546@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Mon Sep 24 03:14:17 2012
New Revision: 240880
URL: http://svn.freebsd.org/changeset/base/240880

Log:
  Partial revert of r239963:
  
  The following change caused rpc.lockd to exit after startup:
  ____
  
  libtirpc: be sure to free cl_netid and cl_tp
  
  When creating a client with clnt_tli_create, it uses strdup to copy
  strings for these fields if nconf is passed in. clnt_dg_destroy frees
  these strings already. Make sure clnt_vc_destroy frees them in the
  same way.
  ____
  
  MFC after:	3 days
  Reported by:	David Wolfskill
  Tested by:	David Wolfskill

Modified:
  head/lib/libc/rpc/clnt_vc.c
  head/sys/rpc/clnt_vc.c

Modified: head/lib/libc/rpc/clnt_vc.c
==============================================================================
--- head/lib/libc/rpc/clnt_vc.c	Sun Sep 23 22:53:39 2012	(r240879)
+++ head/lib/libc/rpc/clnt_vc.c	Mon Sep 24 03:14:17 2012	(r240880)
@@ -672,10 +672,6 @@ clnt_vc_destroy(cl)
 	if (ct->ct_addr.buf)
 		free(ct->ct_addr.buf);
 	mem_free(ct, sizeof(struct ct_data));
-	if (cl->cl_netid && cl->cl_netid[0])
-		mem_free(cl->cl_netid, strlen(cl->cl_netid) +1);
-	if (cl->cl_tp && cl->cl_tp[0])
-		mem_free(cl->cl_tp, strlen(cl->cl_tp) +1);
 	mem_free(cl, sizeof(CLIENT));
 	mutex_unlock(&clnt_fd_lock);
 	thr_sigsetmask(SIG_SETMASK, &(mask), NULL);

Modified: head/sys/rpc/clnt_vc.c
==============================================================================
--- head/sys/rpc/clnt_vc.c	Sun Sep 23 22:53:39 2012	(r240879)
+++ head/sys/rpc/clnt_vc.c	Mon Sep 24 03:14:17 2012	(r240880)
@@ -836,10 +836,6 @@ clnt_vc_destroy(CLIENT *cl)
 		soclose(so);
 	}
 	mem_free(ct, sizeof(struct ct_data));
-	if (cl->cl_netid && cl->cl_netid[0])
-		mem_free(cl->cl_netid, strlen(cl->cl_netid) +1);
-	if (cl->cl_tp && cl->cl_tp[0])
-		mem_free(cl->cl_tp, strlen(cl->cl_tp) +1);
 	mem_free(cl, sizeof(CLIENT));
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209240314.q8O3EIXq031546>