Plug minor memory leak at r284765.

Reported by:	Coverity
CID:		1308401
MFC after:	3 days
This commit is contained in:
Alexander Motin 2015-06-26 16:14:00 +00:00
parent 787c8cb62d
commit 0bb4b98984

View File

@ -508,6 +508,8 @@ conf_new_from_kernel(void)
name = NULL;
STAILQ_FOREACH(port, &devlist.port_list, links) {
if (name)
free(name);
if (port->pp == 0 && port->vp == 0)
name = checked_strdup(port->port_name);
else if (port->vp == 0)