Skip to content

Commit

Permalink
plug leaks, coverity cids 92, 93.
Browse files Browse the repository at this point in the history
  • Loading branch information
elad committed Mar 20, 2006
1 parent c080c43 commit cd7d931
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions usr.bin/mkdep/mkdep.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: mkdep.c,v 1.26 2005/12/12 22:49:37 wiz Exp $ */
/* $NetBSD: mkdep.c,v 1.27 2006/03/20 17:18:06 elad Exp $ */

/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
Expand Down Expand Up @@ -44,7 +44,7 @@
#if !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1999 The NetBSD Foundation, Inc.\n\
All rights reserved.\n");
__RCSID("$NetBSD: mkdep.c,v 1.26 2005/12/12 22:49:37 wiz Exp $");
__RCSID("$NetBSD: mkdep.c,v 1.27 2006/03/20 17:18:06 elad Exp $");
#endif /* not lint */

#include <sys/mman.h>
Expand Down Expand Up @@ -151,6 +151,9 @@ run_cc(int argc, char **argv, const char **fname)
err(EXIT_FAILURE, "unable to fork");
}

free(pathname);
free(args);

while (((pid = wait(&status)) != cpid) && (pid >= 0))
continue;

Expand Down

0 comments on commit cd7d931

Please sign in to comment.