From 366dbfa5c09b717acb9783e43605d7513d61707d Mon Sep 17 00:00:00 2001 From: "Stephen J. Kiernan" Date: Tue, 6 Jun 2017 21:40:35 +0000 Subject: [PATCH] The memory assigned to the local variable 'copy' needs to be freed. Found using clang's static analyzer - scan-build Submitted by: Thomas Rix Reviewed by: ed Approved by: sjg (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9663 --- usr.bin/tset/map.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/tset/map.c b/usr.bin/tset/map.c index 1dd0aa61575..49ce82eae10 100644 --- a/usr.bin/tset/map.c +++ b/usr.bin/tset/map.c @@ -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"); -- 2.45.0