Ian Kent 4816d7
autofs-5.0.4 - fix double free in expire_proc()
Ian Kent 4816d7
Ian Kent 4816d7
From: Ian Kent <raven@themaw.net>
Ian Kent 4816d7
Ian Kent 4816d7
In state.c:expire_proc() the function expire_proc_cleanup() is called
Ian Kent 4816d7
which frees the parameter structure but automount frees this again in
Ian Kent 4816d7
the following line.
Ian Kent 4816d7
---
Ian Kent 4816d7
Ian Kent 4816d7
 CHANGELOG      |    1 +
Ian Kent 4816d7
 daemon/state.c |    1 -
Ian Kent 4816d7
 2 files changed, 1 insertions(+), 1 deletions(-)
Ian Kent 4816d7
Ian Kent 4816d7
Ian Kent 4816d7
diff --git a/CHANGELOG b/CHANGELOG
Ian Kent 4816d7
index 2cb35dc..8860b2c 100644
Ian Kent 4816d7
--- a/CHANGELOG
Ian Kent 4816d7
+++ b/CHANGELOG
Ian Kent 4816d7
@@ -28,6 +28,7 @@
Ian Kent 4816d7
 - add nfs mount protocol default configuration option.
Ian Kent 4816d7
 - fix bad token declaration in master map parser.
Ian Kent 4816d7
 - fix return start status on fail.
Ian Kent 4816d7
+- fix double free in expire_proc().
Ian Kent 4816d7
 
Ian Kent 4816d7
 4/11/2008 autofs-5.0.4
Ian Kent 4816d7
 -----------------------
Ian Kent 4816d7
diff --git a/daemon/state.c b/daemon/state.c
Ian Kent 4816d7
index 606743b..417fde1 100644
Ian Kent 4816d7
--- a/daemon/state.c
Ian Kent 4816d7
+++ b/daemon/state.c
Ian Kent 4816d7
@@ -298,7 +298,6 @@ static enum expire expire_proc(struct autofs_point *ap, int now)
Ian Kent 4816d7
 		error(ap->logopt,
Ian Kent 4816d7
 		      "expire thread create for %s failed", ap->path);
Ian Kent 4816d7
 		expire_proc_cleanup((void *) ea);
Ian Kent 4816d7
-		free(ea);
Ian Kent 4816d7
 		return EXP_ERROR;
Ian Kent 4816d7
 	}
Ian Kent 4816d7
 	ap->exp_thread = thid;