svn commit: r309870 - stable/10/usr.sbin/ctld
Xin LI
delphij at FreeBSD.org
Mon Dec 12 02:22:50 UTC 2016
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] == ':') {
More information about the svn-src-stable
mailing list