From 29d5a11a1fad9d93baab18409faed02547df5a63 Mon Sep 17 00:00:00 2001 From: Tom Keiser Date: Thu, 27 Sep 2007 17:30:32 +0000 Subject: [PATCH] dafs-avoid-volhdr-leak-20070927 when there's an error don't leak the loaded header; release it --- src/vol/volume.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vol/volume.c b/src/vol/volume.c index 5135df8ebf..938a8361f1 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -2755,12 +2755,14 @@ GetVolume(Error * ec, Error * client_ec, VolId volumeId, Volume * hint, int flag } } *ec = VOFFLINE; + ReleaseVolumeHeader(vp->header); vp = NULL; break; } if (V_attachState(vp) == VOL_STATE_UNATTACHED) { *ec = VOFFLINE; + ReleaseVolumeHeader(vp->header); vp = NULL; break; }