Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Feb 2012 20:37:08 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r231531 - stable/8/bin/sh
Message-ID:  <201202112037.q1BKb8l8046965@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Sat Feb 11 20:37:08 2012
New Revision: 231531
URL: http://svn.freebsd.org/changeset/base/231531

Log:
  MFC r231001: sh: Fix swapped INTON/INTOFF.
  
  A possible consequence of this bug was a memory leak if SIGINT arrived
  during a 'set' command (listing variables).

Modified:
  stable/8/bin/sh/var.c
Directory Properties:
  stable/8/bin/sh/   (props changed)

Modified: stable/8/bin/sh/var.c
==============================================================================
--- stable/8/bin/sh/var.c	Sat Feb 11 20:28:42 2012	(r231530)
+++ stable/8/bin/sh/var.c	Sat Feb 11 20:37:08 2012	(r231531)
@@ -547,7 +547,7 @@ showvarscmd(int argc __unused, char **ar
 		}
 	}
 
-	INTON;
+	INTOFF;
 	vars = ckmalloc(n * sizeof(*vars));
 	i = 0;
 	for (vpp = vartab; vpp < vartab + VTABSIZE; vpp++) {
@@ -566,7 +566,7 @@ showvarscmd(int argc __unused, char **ar
 		out1c('\n');
 	}
 	ckfree(vars);
-	INTOFF;
+	INTON;
 
 	return 0;
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202112037.q1BKb8l8046965>