Source-Changes-HG archive

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

[src/netbsd-6]: src/sbin/init Pull up following revision(s) (requested by msa...



details:   https://anonhg.NetBSD.org/src/rev/ed2988dbd1e7
branches:  netbsd-6
changeset: 775505:ed2988dbd1e7
user:      riz <riz%NetBSD.org@localhost>
date:      Fri Nov 23 16:37:21 2012 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #698):
        sbin/init/init.c: revision 1.105
Add missing free() in error path.

diffstat:

 sbin/init/init.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 3c4044307c00 -r ed2988dbd1e7 sbin/init/init.c
--- a/sbin/init/init.c  Fri Nov 23 16:35:21 2012 +0000
+++ b/sbin/init/init.c  Fri Nov 23 16:37:21 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init.c,v 1.102 2011/08/28 10:13:03 christos Exp $      */
+/*     $NetBSD: init.c,v 1.102.4.1 2012/11/23 16:37:21 riz Exp $       */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)init.c     8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: init.c,v 1.102 2011/08/28 10:13:03 christos Exp $");
+__RCSID("$NetBSD: init.c,v 1.102.4.1 2012/11/23 16:37:21 riz Exp $");
 #endif
 #endif /* not lint */
 
@@ -1097,8 +1097,10 @@
        sp->se_index = session_index;
 
        (void)asprintf(&sp->se_device, "%s%s", _PATH_DEV, typ->ty_name);
-       if (!sp->se_device)
+       if (!sp->se_device) {
+               free(sp);
                return NULL;
+       }
 
        if (setupargv(sp, typ) == 0) {
                free_session(sp);



Home | Main Index | Thread Index | Old Index