Author: delphij
Date: Mon Dec 12 02:22:49 2016
New Revision: 309870
URL: https://svnweb.freebsd.org/changeset/base/309870

Log:
  MFC r309241,309243:
  
  Plug memory leaks.

Modified:
  stable/10/usr.sbin/ctld/ctld.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/ctld/ctld.c
==============================================================================
--- stable/10/usr.sbin/ctld/ctld.c      Mon Dec 12 02:21:56 2016        
(r309869)
+++ stable/10/usr.sbin/ctld/ctld.c      Mon Dec 12 02:22:49 2016        
(r309870)
@@ -400,6 +400,7 @@ auth_portal_new(struct auth_group *ag, c
        return (ap);
 
 error:
+       free(str);
        free(ap);
        log_errx(1, "Incorrect initiator portal '%s'", portal);
        return (NULL);
@@ -673,8 +674,10 @@ parse_addr_port(char *arg, const char *d
                 */
                arg++;
                addr = strsep(&arg, "]");
-               if (arg == NULL)
+               if (arg == NULL) {
+                       free(str);
                        return (1);
+               }
                if (arg[0] == '\0') {
                        port = def_port;
                } else if (arg[0] == ':') {
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to