From 0ae9a2345a9dfe5ae10e0dda4bab9f39fd10fe75 Mon Sep 17 00:00:00 2001 From: Ion Badulescu Date: Sun, 25 Apr 2004 23:58:46 +0000 Subject: [PATCH] * amd/map.c (free_map_if_success): avoid dereferencing a pointer to potentially freed memory --- ChangeLog | 5 +++++ amd/map.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cd59f23..c7d2657 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-04-25 Ion Badulescu + + * amd/map.c (free_map_if_success): avoid dereferencing a pointer + to potentially freed memory + 2004-02-26 Erez Zadok * minor new port: i386-unknown-freebsd5.2.1. diff --git a/amd/map.c b/amd/map.c index 60fe969..aad6663 100644 --- a/amd/map.c +++ b/amd/map.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * - * $Id: map.c,v 1.47 2004/01/06 03:56:20 ezk Exp $ + * $Id: map.c,v 1.48 2004/04/25 23:58:46 ib42 Exp $ * */ @@ -804,6 +804,7 @@ free_map_if_success(int rc, int term, opaque_t arg) { am_node *mp = (am_node *) arg; mntfs *mf = mp->am_mnt; + wchan_t wchan = get_mntfs_wchan(mf); /* * Not unmounting any more @@ -853,7 +854,7 @@ free_map_if_success(int rc, int term, opaque_t arg) /* * Wakeup anything waiting for this unmount */ - wakeup(get_mntfs_wchan(mf)); + wakeup(wchan); } -- 2.43.0