From 747a8d8f41a34290c207327541372b4e1fcb0dec Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Mon, 9 Oct 2006 04:15:45 +0000 Subject: [PATCH] h-enum-r-avoid-extra-hold-20061008 FIXES 40699 avoid orphaning an extra hold --- src/viced/host.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/viced/host.c b/src/viced/host.c index 55d440db8e..14fe833b50 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -1123,8 +1123,11 @@ h_Enumerate_r(int (*proc) (), struct host *enumstart, char *param) held = (*proc) (host, held, param); if (!H_ENUMERATE_ISSET_HELD(held)) h_Release_r(host); /* this might free up the host */ - if (H_ENUMERATE_ISSET_BAIL(held)) + if (H_ENUMERATE_ISSET_BAIL(held)) { + if (!H_ENUMERATE_ISSET_HELD(nheld)) + h_Release_r(next); /* this might free up the host */ break; + } } } /*h_Enumerate_r */