X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/25dd5fca341866aad4ae182313bdf902ae4c349f..4482840eccb9facf57a7a0f8e7d4f447563804dd:/mdoc_argv.c?ds=inline diff --git a/mdoc_argv.c b/mdoc_argv.c index c55bcdd9..453d1146 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_argv.c,v 1.57 2010/07/21 09:08:26 kristaps Exp $ */ +/* $Id: mdoc_argv.c,v 1.58 2010/07/21 09:36:41 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -313,9 +313,11 @@ mdoc_argv_free(struct mdoc_arg *p) void mdoc_argn_free(struct mdoc_arg *p, int iarg) { - struct mdoc_argv *arg = &p->argv[iarg]; /* FIXME: decl/assign */ + struct mdoc_argv *arg; int j; + arg = &p->argv[iarg]; + if (arg->sz && arg->value) { for (j = (int)arg->sz - 1; j >= 0; j--) free(arg->value[j]);