From: Neil Brown Date: Wed, 2 May 2007 23:33:20 +0000 (+1000) Subject: statd - the files created are named for dns_name, so use that when unlinking. X-Git-Tag: nfs-utils-1-1-0~7 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=6080a2854af9c12a5794a389e98f0cd4d3942a6c statd - the files created are named for dns_name, so use that when unlinking. Also free dns_name when freeing an 'nlist', so do the unlink before the free. --- diff --git a/utils/statd/monitor.c b/utils/statd/monitor.c index c447a26..e40ff7d 100644 --- a/utils/statd/monitor.c +++ b/utils/statd/monitor.c @@ -380,8 +380,8 @@ sm_unmon_1_svc(struct mon_id *argp, struct svc_req *rqstp) /* PRC: do the HA callout: */ ha_callout("del-client", mon_name, my_name, -1); + xunlink(SM_DIR, clnt->dns_name, 1); nlist_free(&rtnl, clnt); - xunlink(SM_DIR, mon_name, 1); return (&result); } else @@ -445,8 +445,8 @@ sm_unmon_all_1_svc(struct my_id *argp, struct svc_req *rqstp) temp = NL_NEXT(clnt); /* PRC: do the HA callout: */ ha_callout("del-client", mon_name, my_name, -1); + xunlink(SM_DIR, clnt->dns_name, 1); nlist_free(&rtnl, clnt); - xunlink(SM_DIR, mon_name, 1); ++count; clnt = temp; } else diff --git a/utils/statd/notlist.c b/utils/statd/notlist.c index b74d9df..1698c26 100644 --- a/utils/statd/notlist.c +++ b/utils/statd/notlist.c @@ -211,6 +211,7 @@ nlist_free(notify_list **head, notify_list *entry) free(NL_MY_NAME(entry)); if (NL_MON_NAME(entry)) free(NL_MON_NAME(entry)); + free(entry->dns_name); free(entry); }