diff options
author | mav <mav@FreeBSD.org> | 2015-06-26 16:14:00 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-06-26 16:14:00 +0000 |
commit | 7fae2fa74ecfc17309910d1123e159f4542972d2 (patch) | |
tree | 5f70a60ad261b982a8de580aa134ca5b93d334a8 /usr.sbin/ctld | |
parent | 2ec74b0c520c72932f4e411fece67069d073bcfd (diff) | |
download | FreeBSD-src-7fae2fa74ecfc17309910d1123e159f4542972d2.zip FreeBSD-src-7fae2fa74ecfc17309910d1123e159f4542972d2.tar.gz |
Plug minor memory leak at r284765.
Reported by: Coverity
CID: 1308401
MFC after: 3 days
Diffstat (limited to 'usr.sbin/ctld')
-rw-r--r-- | usr.sbin/ctld/kernel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/ctld/kernel.c b/usr.sbin/ctld/kernel.c index 799f2e2..6cccdab 100644 --- a/usr.sbin/ctld/kernel.c +++ b/usr.sbin/ctld/kernel.c @@ -508,6 +508,8 @@ retry_port: 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) |