Module Name: src
Committed By: wiz
Date: Tue Jan 4 23:36:23 UTC 2011
Modified Files:
src/sbin/mount_portal: pt_filter.c
Log Message:
Use pclose for popened handles. Found by cppcheck.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sbin/mount_portal/pt_filter.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/mount_portal/pt_filter.c
diff -u src/sbin/mount_portal/pt_filter.c:1.10 src/sbin/mount_portal/pt_filter.c:1.11
--- src/sbin/mount_portal/pt_filter.c:1.10 Mon Apr 28 20:23:09 2008
+++ src/sbin/mount_portal/pt_filter.c Tue Jan 4 23:36:23 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pt_filter.c,v 1.10 2008/04/28 20:23:09 martin Exp $ */
+/* $NetBSD: pt_filter.c,v 1.11 2011/01/04 23:36:23 wiz Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: pt_filter.c,v 1.10 2008/04/28 20:23:09 martin Exp $");
+__RCSID("$NetBSD: pt_filter.c,v 1.11 2011/01/04 23:36:23 wiz Exp $");
#endif /* not lint */
#include <stdio.h>
@@ -149,7 +149,7 @@
if ((seteuid((uid_t) 0) < 0) || (setegid((gid_t) 0) < 0)) {
error = errno;
syslog(LOG_WARNING, "setcred: %m");
- fclose(fp);
+ pclose(fp);
fp = NULL;
}
}
@@ -193,7 +193,7 @@
if ((seteuid((uid_t) 0) < 0) || (setegid((gid_t) 0) < 0)) {
error = errno;
syslog(LOG_WARNING, "setcred: %m");
- fclose(fp);
+ pclose(fp);
fp = NULL;
}
}