svn commit: r288699 - stable/10/usr.sbin/ctld
Alexander Motin
mav at FreeBSD.org
Mon Oct 5 07:33:55 UTC 2015
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);
More information about the svn-src-stable-10
mailing list