The memory assigned to the local variable 'copy' needs to be freed.

Found using clang's static analyzer - scan-build

Submitted by:	Thomas Rix <trix@juniper.net>
Reviewed by:	ed
Approved by:	sjg (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9663
This commit is contained in:
Stephen J. Kiernan 2017-06-06 21:40:35 +00:00
parent 79fb1e455e
commit 366dbfa5c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319636

View File

@ -157,6 +157,7 @@ done: if (port) {
badmopt: errx(1, "illegal -m option format: %s", copy);
mapp->porttype = strdup(port);
}
free(copy);
#ifdef MAPDEBUG
(void)printf("port: %s\n", mapp->porttype ? mapp->porttype : "ANY");