summaryrefslogtreecommitdiff
path: root/usr.bin/gprof
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>2004-07-23 23:15:19 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>2004-07-23 23:15:19 +0000
commitb21055f17894e58b8afedf10d3af2f612ddd5504 (patch)
tree4cf8c46891696e6891ecac0414d5cb29ae74eb54 /usr.bin/gprof
parentb22403c650a6c83044dff5ebb69c35832e992b8e (diff)
fix use after free due to freeing incorrect item.
looks right to me millert@
Diffstat (limited to 'usr.bin/gprof')
-rw-r--r--usr.bin/gprof/arcs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/gprof/arcs.c b/usr.bin/gprof/arcs.c
index 02d3713bcef..c31101b060f 100644
--- a/usr.bin/gprof/arcs.c
+++ b/usr.bin/gprof/arcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arcs.c,v 1.8 2004/07/20 08:46:23 art Exp $ */
+/* $OpenBSD: arcs.c,v 1.9 2004/07/23 23:15:18 marc Exp $ */
/* $NetBSD: arcs.c,v 1.6 1995/04/19 07:15:52 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)arcs.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: arcs.c,v 1.8 2004/07/20 08:46:23 art Exp $";
+static char rcsid[] = "$OpenBSD: arcs.c,v 1.9 2004/07/23 23:15:18 marc Exp $";
#endif
#endif /* not lint */
@@ -745,8 +745,8 @@ compresslist()
(*arcpp) -> arc_cyclecnt--;
cyclecnt--;
*prev = clp -> next;
- clp = clp -> next;
free( clp );
+ clp = *prev;
}
}