From owner-svn-src-stable-9@FreeBSD.ORG Fri Oct 5 10:44:51 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B4D11106566C; Fri, 5 Oct 2012 10:44:51 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E9EE8FC08; Fri, 5 Oct 2012 10:44:51 +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 q95Aiphf052280; Fri, 5 Oct 2012 10:44:51 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95AipCg052278; Fri, 5 Oct 2012 10:44:51 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201210051044.q95AipCg052278@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 5 Oct 2012 10:44:51 +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: r241223 - stable/9/sbin/camcontrol 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: Fri, 05 Oct 2012 10:44:51 -0000 Author: jh Date: Fri Oct 5 10:44:50 2012 New Revision: 241223 URL: http://svn.freebsd.org/changeset/base/241223 Log: MFC r239612: Check the return value of sbuf_finish(). Modified: stable/9/sbin/camcontrol/camcontrol.c Directory Properties: stable/9/sbin/camcontrol/ (props changed) Modified: stable/9/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.c Fri Oct 5 09:47:54 2012 (r241222) +++ stable/9/sbin/camcontrol/camcontrol.c Fri Oct 5 10:44:50 2012 (r241223) @@ -4757,7 +4757,10 @@ try_long: smp_report_general_sbuf(response, sizeof(*response), sb); - sbuf_finish(sb); + if (sbuf_finish(sb) != 0) { + warnx("%s: sbuf_finish", __func__); + goto bailout; + } printf("%s", sbuf_data(sb)); @@ -5128,7 +5131,10 @@ smpmaninfo(struct cam_device *device, in smp_report_manuf_info_sbuf(&response, sizeof(response), sb); - sbuf_finish(sb); + if (sbuf_finish(sb) != 0) { + warnx("%s: sbuf_finish", __func__); + goto bailout; + } printf("%s", sbuf_data(sb));