Source-Changes-HG archive

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

[src/trunk]: src/sbin/ifconfig Don't call prop_distionary_make_immutable on a...



details:   https://anonhg.NetBSD.org/src/rev/34cab627f885
branches:  trunk
changeset: 784716:34cab627f885
user:      apb <apb%NetBSD.org@localhost>
date:      Thu Feb 07 11:24:15 2013 +0000

description:
Don't call prop_distionary_make_immutable on a NULL pointer.
Coverity CID 275179.

diffstat:

 sbin/ifconfig/env.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 77d11a11d7f4 -r 34cab627f885 sbin/ifconfig/env.c
--- a/sbin/ifconfig/env.c       Thu Feb 07 11:00:59 2013 +0000
+++ b/sbin/ifconfig/env.c       Thu Feb 07 11:24:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: env.c,v 1.7 2010/12/13 17:35:08 pooka Exp $    */
+/*     $NetBSD: env.c,v 1.8 2013/02/07 11:24:15 apb Exp $      */
 
 /*-
  * Copyright (c) 2008 David Young.  All rights reserved.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: env.c,v 1.7 2010/12/13 17:35:08 pooka Exp $");
+__RCSID("$NetBSD: env.c,v 1.8 2013/02/07 11:24:15 apb Exp $");
 #endif /* not lint */
 
 #include <errno.h>
@@ -67,7 +67,8 @@
                }
        }
        prop_object_iterator_release(i);
-       prop_dictionary_make_immutable(d);
+       if (d !== NULL)
+               prop_dictionary_make_immutable(d);
        return d;
 }
 



Home | Main Index | Thread Index | Old Index