From owner-svn-src-all@freebsd.org Tue Dec 20 04:05:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3AA8C88CD5; Tue, 20 Dec 2016 04:05:22 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2F431D0C; Tue, 20 Dec 2016 04:05:22 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBK45Li3051855; Tue, 20 Dec 2016 04:05:21 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBK45L9Q051854; Tue, 20 Dec 2016 04:05:21 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201612200405.uBK45L9Q051854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Tue, 20 Dec 2016 04:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310311 - head/usr.sbin/syslogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 20 Dec 2016 04:05:23 -0000 Author: hrs Date: Tue Dec 20 04:05:21 2016 New Revision: 310311 URL: https://svnweb.freebsd.org/changeset/base/310311 Log: Add a NULL check. Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Tue Dec 20 03:41:40 2016 (r310310) +++ head/usr.sbin/syslogd/syslogd.c Tue Dec 20 04:05:21 2016 (r310311) @@ -532,6 +532,8 @@ main(int argc, char *argv[]) if (bflag == 0) { pe = calloc(1, sizeof(*pe)); + if (pe == NULL) + err(1, "malloc failed"); *pe = (struct peer) { .pe_serv = "syslog" };