From owner-svn-src-stable@FreeBSD.ORG Fri Nov 25 10:30:29 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84D131065673; Fri, 25 Nov 2011 10:30:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73E338FC13; Fri, 25 Nov 2011 10:30:29 +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 pAPAUTYK038248; Fri, 25 Nov 2011 10:30:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAPAUTe7038246; Fri, 25 Nov 2011 10:30:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111251030.pAPAUTe7038246@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 25 Nov 2011 10:30:29 +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: r227966 - stable/9/lib/librt X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2011 10:30:29 -0000 Author: kib Date: Fri Nov 25 10:30:29 2011 New Revision: 227966 URL: http://svn.freebsd.org/changeset/base/227966 Log: MFC r227661: Free unused allocation on error. Approved by: re (bz) Modified: stable/9/lib/librt/timer.c Directory Properties: stable/9/lib/librt/ (props changed) Modified: stable/9/lib/librt/timer.c ============================================================================== --- stable/9/lib/librt/timer.c Fri Nov 25 10:29:22 2011 (r227965) +++ stable/9/lib/librt/timer.c Fri Nov 25 10:30:29 2011 (r227966) @@ -102,12 +102,14 @@ __timer_create(clockid_t clockid, struct } if (__sigev_check_init()) { + free(timer); errno = EINVAL; return (-1); } sn = __sigev_alloc(SI_TIMER, evp, NULL, 0); if (sn == NULL) { + free(timer); errno = EAGAIN; return (-1); }