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;
}
}
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"