Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/mount_portal Use pclose for popened handles. Found by c...



details:   https://anonhg.NetBSD.org/src/rev/9100a5f33ba7
branches:  trunk
changeset: 760434:9100a5f33ba7
user:      wiz <wiz%NetBSD.org@localhost>
date:      Tue Jan 04 23:36:23 2011 +0000

description:
Use pclose for popened handles. Found by cppcheck.

diffstat:

 sbin/mount_portal/pt_filter.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 98b638af1048 -r 9100a5f33ba7 sbin/mount_portal/pt_filter.c
--- a/sbin/mount_portal/pt_filter.c     Tue Jan 04 23:31:29 2011 +0000
+++ b/sbin/mount_portal/pt_filter.c     Tue Jan 04 23:36:23 2011 +0000
@@ -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;
                }
        }



Home | Main Index | Thread Index | Old Index