From 3c01e31040c2984c114ac9977789b76185e726e6 Mon Sep 17 00:00:00 2001 From: eadler Date: Wed, 21 Dec 2011 20:27:41 +0000 Subject: - Remove extraneous null ptr deref checks - Fix memory leak Submitted by: Slono Slono Approved by: jhb MFC after: 1 week --- usr.sbin/fwcontrol/fwcontrol.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'usr.sbin/fwcontrol/fwcontrol.c') diff --git a/usr.sbin/fwcontrol/fwcontrol.c b/usr.sbin/fwcontrol/fwcontrol.c index 6aa365a..b8aeb5b 100644 --- a/usr.sbin/fwcontrol/fwcontrol.c +++ b/usr.sbin/fwcontrol/fwcontrol.c @@ -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; } } -- cgit v1.1