From c2b29c9319f156dccee19691cf564833580643ae Mon Sep 17 00:00:00 2001 From: pfg Date: Mon, 24 Sep 2012 03:14:17 +0000 Subject: 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 --- sys/rpc/clnt_vc.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sys/rpc') diff --git a/sys/rpc/clnt_vc.c b/sys/rpc/clnt_vc.c index 26f23fa..ea3b7d1 100644 --- a/sys/rpc/clnt_vc.c +++ b/sys/rpc/clnt_vc.c @@ -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)); } -- cgit v1.1