From owner-svn-src-all@FreeBSD.ORG Sat Feb 11 20:37:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04F12106566C; Sat, 11 Feb 2012 20:37:09 +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 E298D8FC13; Sat, 11 Feb 2012 20:37:08 +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 q1BKb8mK046967; Sat, 11 Feb 2012 20:37:08 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1BKb8l8046965; Sat, 11 Feb 2012 20:37:08 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201202112037.q1BKb8l8046965@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 11 Feb 2012 20:37:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231531 - stable/8/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2012 20:37:09 -0000 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; }