Coverity CID 2297: Fix memory leak.

This commit is contained in:
christos 2006-03-18 09:51:08 +00:00
parent 22983123c5
commit 6edcc275a1
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.59 2005/06/27 01:37:32 christos Exp $ */
/* $NetBSD: main.c,v 1.60 2006/03/18 09:51:08 christos Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1991, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95";
#else
__RCSID("$NetBSD: main.c,v 1.59 2005/06/27 01:37:32 christos Exp $");
__RCSID("$NetBSD: main.c,v 1.60 2006/03/18 09:51:08 christos Exp $");
#endif
#endif /* not lint */
@ -763,7 +763,8 @@ obsolete(int *argcp, char **argvp[])
if (flags) {
*p = '\0';
*nargv++ = flagsp;
}
} else
free(flagsp);
/* Copy remaining arguments. */
while ((*nargv++ = *argv++) != NULL)