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:
parent
79fb1e455e
commit
366dbfa5c0
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user