svn commit: r261181 - head/bin/pax
Kevin Lo
kevlo at FreeBSD.org
Sun Jan 26 07:20:33 UTC 2014
Author: kevlo
Date: Sun Jan 26 07:20:32 2014
New Revision: 261181
URL: http://svnweb.freebsd.org/changeset/base/261181
Log:
Stop the options string leak if it is not attached into the options
linked list.
Obtained from: OpenBSD
Modified:
head/bin/pax/options.c
Modified: head/bin/pax/options.c
==============================================================================
--- head/bin/pax/options.c Sun Jan 26 04:57:58 2014 (r261180)
+++ head/bin/pax/options.c Sun Jan 26 07:20:32 2014 (r261181)
@@ -1385,6 +1385,7 @@ opt_add(const char *str)
free(lstr);
return(-1);
}
+ lstr = NULL; /* parts of string going onto the OPLIST */
*pt++ = '\0';
opt->name = frpt;
opt->value = pt;
@@ -1400,6 +1401,7 @@ opt_add(const char *str)
optail->fow = opt;
optail = opt;
}
+ free(lstr);
return(0);
}
More information about the svn-src-all
mailing list