Date: Thu, 26 Feb 2015 09:08:48 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279314 - head/usr.sbin/ctld Message-ID: <201502260908.t1Q98m5s071333@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Thu Feb 26 09:08:48 2015 New Revision: 279314 URL: https://svnweb.freebsd.org/changeset/base/279314 Log: Add missing error check. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/parse.y Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Thu Feb 26 07:51:43 2015 (r279313) +++ head/usr.sbin/ctld/parse.y Thu Feb 26 09:08:48 2015 (r279314) @@ -774,6 +774,7 @@ target_lun: LUN lun_number lun_number: STR { uint64_t tmp; + int ret; char *name; if (expand_number($1, &tmp) != 0) { @@ -782,7 +783,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?201502260908.t1Q98m5s071333>