From 0bb4b98984e8c7279b02ca78185ad508c3a84bed Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Fri, 26 Jun 2015 16:14:00 +0000 Subject: [PATCH] Plug minor memory leak at r284765. Reported by: Coverity CID: 1308401 MFC after: 3 days --- usr.sbin/ctld/kernel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/ctld/kernel.c b/usr.sbin/ctld/kernel.c index 799f2e2f821b..6cccdab1c426 100644 --- a/usr.sbin/ctld/kernel.c +++ b/usr.sbin/ctld/kernel.c @@ -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)