svn commit: r249897 - head/sbin/ifconfig
Gleb Smirnoff
glebius at FreeBSD.org
Thu Apr 25 16:34:04 UTC 2013
Author: glebius
Date: Thu Apr 25 16:34:04 2013
New Revision: 249897
URL: http://svnweb.freebsd.org/changeset/base/249897
Log:
Don't free memory that is going to be used as error string.
PR: bin/178121
Submitted by: Garrett Cooper <yaneurabeya gmail.com>
Modified:
head/sbin/ifconfig/iflagg.c
Modified: head/sbin/ifconfig/iflagg.c
==============================================================================
--- head/sbin/ifconfig/iflagg.c Thu Apr 25 16:23:22 2013 (r249896)
+++ head/sbin/ifconfig/iflagg.c Thu Apr 25 16:34:04 2013 (r249897)
@@ -98,10 +98,8 @@ setlagghash(const char *val, int d, int
rf.rf_flags |= LAGG_F_HASHL3;
else if (strcmp(tok, "l4") == 0)
rf.rf_flags |= LAGG_F_HASHL4;
- else {
- free(str);
+ else
errx(1, "Invalid lagghash option: %s", tok);
- }
}
free(str);
if (rf.rf_flags == 0)
More information about the svn-src-all
mailing list