Coverity CID 1860: Plug memory leak.

This commit is contained in:
christos 2006-05-25 00:07:59 +00:00
parent aa0a3ef501
commit 2a8477a7f9
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kgmon.c,v 1.17 2006/05/25 00:05:45 christos Exp $ */ /* $NetBSD: kgmon.c,v 1.18 2006/05/25 00:07:59 christos Exp $ */
/* /*
* Copyright (c) 1983, 1992, 1993 * Copyright (c) 1983, 1992, 1993
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1992, 1993\n\
#if 0 #if 0
static char sccsid[] = "from: @(#)kgmon.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "from: @(#)kgmon.c 8.1 (Berkeley) 6/6/93";
#else #else
__RCSID("$NetBSD: kgmon.c,v 1.17 2006/05/25 00:05:45 christos Exp $"); __RCSID("$NetBSD: kgmon.c,v 1.18 2006/05/25 00:07:59 christos Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -401,6 +401,7 @@ dumpstate(struct kvmvars *kvp)
fwrite((char *)&rawarc, sizeof(rawarc), 1, fp); fwrite((char *)&rawarc, sizeof(rawarc), 1, fp);
} }
} }
free(tos);
fclose(fp); fclose(fp);
} }