diff options
author | glebius <glebius@FreeBSD.org> | 2013-04-25 16:34:04 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2013-04-25 16:34:04 +0000 |
commit | e31cb18360919b0c74c607ca1d3983020b8e033f (patch) | |
tree | 982b2757ee4a876bc1d2f3b37b2f7d69719a794a /sbin/ifconfig | |
parent | 994710f1ae309334ef368e7af0f919fbb1b44592 (diff) | |
download | FreeBSD-src-e31cb18360919b0c74c607ca1d3983020b8e033f.zip FreeBSD-src-e31cb18360919b0c74c607ca1d3983020b8e033f.tar.gz |
Don't free memory that is going to be used as error string.
PR: bin/178121
Submitted by: Garrett Cooper <yaneurabeya gmail.com>
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r-- | sbin/ifconfig/iflagg.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sbin/ifconfig/iflagg.c b/sbin/ifconfig/iflagg.c index a474729..29b8574 100644 --- a/sbin/ifconfig/iflagg.c +++ b/sbin/ifconfig/iflagg.c @@ -98,10 +98,8 @@ setlagghash(const char *val, int d, int s, const struct afswtch *afp) 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) |