Date: Mon, 5 Oct 2015 07:33:55 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288699 - stable/10/usr.sbin/ctld Message-ID: <201510050733.t957Xtc0080254@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Mon Oct 5 07:33:54 2015 New Revision: 288699 URL: https://svnweb.freebsd.org/changeset/base/288699 Log: MFC r279314 (by trasz): Add missing error check. Modified: stable/10/usr.sbin/ctld/parse.y Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Mon Oct 5 07:31:51 2015 (r288698) +++ stable/10/usr.sbin/ctld/parse.y Mon Oct 5 07:33:54 2015 (r288699) @@ -761,6 +761,7 @@ target_lun: LUN lun_number lun_number: STR { uint64_t tmp; + int ret; char *name; if (expand_number($1, &tmp) != 0) { @@ -769,7 +770,9 @@ lun_number: STR return (1); } - asprintf(&name, "%s,lun,%ju", target->t_name, tmp); + ret = asprintf(&name, "%s,lun,%ju", target->t_name, tmp); + if (ret <= 0) + log_err(1, "asprintf"); lun = lun_new(conf, name); if (lun == NULL) return (1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510050733.t957Xtc0080254>