Module Name: src
Committed By: wiz
Date: Fri Sep 7 11:29:05 UTC 2012
Modified Files:
src/usr.sbin/makemandb: makemandb.c
Log Message:
Use emalloc in one more place, like the rest of the code does.
>From Abhinav Upadhyay <[email protected]>.
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/makemandb/makemandb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/makemandb/makemandb.c
diff -u src/usr.sbin/makemandb/makemandb.c:1.13 src/usr.sbin/makemandb/makemandb.c:1.14
--- src/usr.sbin/makemandb/makemandb.c:1.13 Wed Aug 29 20:33:01 2012
+++ src/usr.sbin/makemandb/makemandb.c Fri Sep 7 11:29:04 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: makemandb.c,v 1.13 2012/08/29 20:33:01 wiz Exp $ */
+/* $NetBSD: makemandb.c,v 1.14 2012/09/07 11:29:04 wiz Exp $ */
/*
* Copyright (c) 2011 Abhinav Upadhyay <[email protected]>
* Copyright (c) 2011 Kristaps Dzonsons <[email protected]>
@@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: makemandb.c,v 1.13 2012/08/29 20:33:01 wiz Exp $");
+__RCSID("$NetBSD: makemandb.c,v 1.14 2012/09/07 11:29:04 wiz Exp $");
#include <sys/stat.h>
#include <sys/types.h>
@@ -361,7 +361,7 @@ main(int argc, char *argv[])
if (manconf) {
char *arg;
size_t command_len = shquote(manconf, NULL, 0) + 1;
- arg = malloc(command_len );
+ arg = emalloc(command_len);
shquote(manconf, arg, command_len);
easprintf(&command, "man -p -C %s", arg);
free(arg);