diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-11-28 11:38:00 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-11-28 11:38:00 +0000 |
commit | e184890429716e51eb7256b719de255e246e7b36 (patch) | |
tree | 458d7266bfde16f8a6690156be6959122e7a67fd | |
parent | a329ce01002c738c1e43e7bcddc20d0874453fdb (diff) |
unref the label when free'ing a protocol node
-rw-r--r-- | usr.sbin/hoststated/hoststated.c | 4 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/hoststated/hoststated.c b/usr.sbin/hoststated/hoststated.c index ad5ba8366c0..c0ea8f8d7ef 100644 --- a/usr.sbin/hoststated/hoststated.c +++ b/usr.sbin/hoststated/hoststated.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hoststated.c,v 1.60 2007/11/25 20:01:10 reyk Exp $ */ +/* $OpenBSD: hoststated.c,v 1.61 2007/11/28 11:37:59 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -532,6 +532,8 @@ purge_tree(struct proto_tree *tree) free(pn->key); if (pn->value != NULL) free(pn->value); + if (pn->label != 0) + pn_unref(pn->label); free(pn); } free(proot); diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index bd69ea95dff..cebc5659189 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.60 2007/11/25 20:01:10 reyk Exp $ */ +/* $OpenBSD: relayd.c,v 1.61 2007/11/28 11:37:59 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -532,6 +532,8 @@ purge_tree(struct proto_tree *tree) free(pn->key); if (pn->value != NULL) free(pn->value); + if (pn->label != 0) + pn_unref(pn->label); free(pn); } free(proot); |