]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
statd - the files created are named for dns_name, so use that when unlinking.
authorNeil Brown <neilb@suse.de>
Wed, 2 May 2007 23:33:20 +0000 (09:33 +1000)
committerNeil Brown <neilb@suse.de>
Wed, 2 May 2007 23:33:20 +0000 (09:33 +1000)
Also free dns_name when freeing an 'nlist', so do the unlink before the free.

utils/statd/monitor.c
utils/statd/notlist.c

index c447a269bb9b86f2c82091ff7844e6cb693977ac..e40ff7d3a49a2c6b28860865336c9d257592dd8e 100644 (file)
@@ -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
index b74d9df07b1806667e5a7992ae675223771a0824..1698c26abef92166941dc39eba066b879422957c 100644 (file)
@@ -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);
 }