Don't try to avoid calling free(3) with NULL argument.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
trasz 2015-11-14 16:06:01 +00:00
parent beb14530b9
commit b1195936c3

View File

@ -515,8 +515,7 @@ retry_port:
STAILQ_FOREACH(port, &devlist.port_list, links) {
if (strcmp(port->port_frontend, "ha") == 0)
continue;
if (name)
free(name);
free(name);
if (port->pp == 0 && port->vp == 0)
name = checked_strdup(port->port_name);
else if (port->vp == 0)
@ -583,8 +582,7 @@ retry_port:
}
cp->p_ctl_port = port->port_id;
}
if (name)
free(name);
free(name);
STAILQ_FOREACH(lun, &devlist.lun_list, links) {
struct cctl_lun_nv *nv;