summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-08 12:46:38 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-08 12:46:38 +0000
commit764e05c60c54c1e2184996ce773ca5725d991416 (patch)
treef8c30a3b7325b5b65cfe8f69c0cd3b2b29288eed
parent74e270cb031a950090a2f9a9c1a083e2c45ebb6a (diff)
downloadmandoc-764e05c60c54c1e2184996ce773ca5725d991416.tar.gz
Fixed null-pointer dereference.
-rw-r--r--argv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/argv.c b/argv.c
index aa47ac64..61f9e06b 100644
--- a/argv.c
+++ b/argv.c
@@ -293,6 +293,9 @@ mdoc_argv_free(struct mdoc_arg *p)
{
int i, j;
+ if (NULL == p)
+ return;
+
if (p->refcnt) {
--(p->refcnt);
if (p->refcnt)