summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-05-24 12:38:09 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-05-24 12:38:09 +0000
commita47fb5638b304e81314046933a16e87a3cf1795e (patch)
tree94688881f896d1192c616261692ca039a49a9f4b /usr.bin
parentdd42fa345925d50f85acaae84e28ac464944439e (diff)
fix memory leak for .AT; from kristaps@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/man_action.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/mandoc/man_action.c b/usr.bin/mandoc/man_action.c
index 24bdda2e0ff..6a10bc7d9fe 100644
--- a/usr.bin/mandoc/man_action.c
+++ b/usr.bin/mandoc/man_action.c
@@ -1,4 +1,4 @@
-/* $Id: man_action.c,v 1.20 2010/05/23 22:45:00 schwarze Exp $ */
+/* $Id: man_action.c,v 1.21 2010/05/24 12:38:08 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -216,6 +216,9 @@ post_AT(struct man *m)
p = unix_versions[0];
}
+ if (m->meta.source)
+ free(m->meta.source);
+
m->meta.source = mandoc_strdup(p);
return(1);