svn commit: r231529 - stable/9/bin/sh

Jilles Tjoelker jilles at FreeBSD.org
Sat Feb 11 20:08:47 UTC 2012


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;
 }


More information about the svn-src-stable mailing list