Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Feb 2012 20:08:46 +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-9@freebsd.org
Subject:   svn commit: r231529 - stable/9/bin/sh
Message-ID:  <201202112008.q1BK8kAg045968@svn.freebsd.org>

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

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/9/bin/sh/var.c
Directory Properties:
  stable/9/bin/sh/   (props changed)

Modified: stable/9/bin/sh/var.c
==============================================================================
--- stable/9/bin/sh/var.c	Sat Feb 11 20:01:03 2012	(r231528)
+++ stable/9/bin/sh/var.c	Sat Feb 11 20:08:46 2012	(r231529)
@@ -600,7 +600,7 @@ showvarscmd(int argc __unused, char **ar
 		}
 	}
 
-	INTON;
+	INTOFF;
 	vars = ckmalloc(n * sizeof(*vars));
 	i = 0;
 	for (vpp = vartab; vpp < vartab + VTABSIZE; vpp++) {
@@ -625,7 +625,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?201202112008.q1BK8kAg045968>