Date: Tue, 10 Jan 2012 01:02:40 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r229901 - stable/7/usr.sbin/fwcontrol Message-ID: <201201100102.q0A12eXp072788@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler (ports committer) Date: Tue Jan 10 01:02:40 2012 New Revision: 229901 URL: http://svn.freebsd.org/changeset/base/229901 Log: - Remove extraneous null ptr deref checks - Fix memory leak Approved by: jhb Modified: stable/7/usr.sbin/fwcontrol/fwcontrol.c Directory Properties: stable/7/usr.sbin/fwcontrol/ (props changed) Modified: stable/7/usr.sbin/fwcontrol/fwcontrol.c ============================================================================== --- stable/7/usr.sbin/fwcontrol/fwcontrol.c Tue Jan 10 01:02:19 2012 (r229900) +++ stable/7/usr.sbin/fwcontrol/fwcontrol.c Tue Jan 10 01:02:40 2012 (r229901) @@ -152,8 +152,7 @@ str2node(int fd, const char *nodestr) fweui2eui64(&data->dev[i].eui, &tmpeui); if (memcmp(&eui, &tmpeui, sizeof(struct eui64)) == 0) { node = data->dev[i].dst; - if (data != NULL) - free(data); + free(data); goto gotnode; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201100102.q0A12eXp072788>