summaryrefslogtreecommitdiffstatshomepage
path: root/man_action.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-24 12:22:43 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-24 12:22:43 +0000
commitaccf9fd8fc2f262a27c05a8fdc3ef58b2658ca33 (patch)
treeba5435ac2aee35f4359ba4b7e9f25a2282fb1b93 /man_action.c
parent4c257890260702a964cb6757fd50d6b411f557fa (diff)
downloadmandoc-accf9fd8fc2f262a27c05a8fdc3ef58b2658ca33.tar.gz
mandoc-accf9fd8fc2f262a27c05a8fdc3ef58b2658ca33.tar.zst
mandoc-accf9fd8fc2f262a27c05a8fdc3ef58b2658ca33.zip
Fixed memory leak for `AT' (-man input).
Diffstat (limited to 'man_action.c')
-rw-r--r--man_action.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/man_action.c b/man_action.c
index 55fe11fd..813062f6 100644
--- a/man_action.c
+++ b/man_action.c
@@ -1,4 +1,4 @@
-/* $Id: man_action.c,v 1.36 2010/05/17 22:11:42 kristaps Exp $ */
+/* $Id: man_action.c,v 1.37 2010/05/24 12:22:43 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -219,6 +219,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);