From owner-svn-src-stable-9@FreeBSD.ORG Sat Feb 11 20:08:47 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 228FF1065672; Sat, 11 Feb 2012 20:08:47 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9A28FC13; Sat, 11 Feb 2012 20:08:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1BK8kpa045970; Sat, 11 Feb 2012 20:08:46 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1BK8kAg045968; Sat, 11 Feb 2012 20:08:46 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201202112008.q1BK8kAg045968@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 11 Feb 2012 20:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231529 - stable/9/bin/sh X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2012 20:08:47 -0000 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; }