Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Apr 2013 16:34:04 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r249897 - head/sbin/ifconfig
Message-ID:  <201304251634.r3PGY4iI038543@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304251634.r3PGY4iI038543>