Author: stevek
Date: Tue Jun  6 21:40:35 2017
New Revision: 319636
URL: https://svnweb.freebsd.org/changeset/base/319636

Log:
  The memory assigned to the local variable 'copy' needs to be freed.
  
  Found using clang's static analyzer - scan-build
  
  Submitted by: Thomas Rix <t...@juniper.net>
  Reviewed by:  ed
  Approved by:  sjg (mentor)
  MFC after:    1 week
  Differential Revision:        https://reviews.freebsd.org/D9663

Modified:
  head/usr.bin/tset/map.c

Modified: head/usr.bin/tset/map.c
==============================================================================
--- head/usr.bin/tset/map.c     Tue Jun  6 21:08:05 2017        (r319635)
+++ head/usr.bin/tset/map.c     Tue Jun  6 21:40:35 2017        (r319636)
@@ -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");
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to