summaryrefslogtreecommitdiffstats
path: root/usr.sbin/fwcontrol/fwcontrol.c
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2011-12-21 20:27:41 +0000
committereadler <eadler@FreeBSD.org>2011-12-21 20:27:41 +0000
commit3c01e31040c2984c114ac9977789b76185e726e6 (patch)
tree7c566920fb5ced92e004cf337adc73daa4f7fdb7 /usr.sbin/fwcontrol/fwcontrol.c
parentd24fa001e9004ec4a6f53ac209eeb53f2b6cc1ab (diff)
downloadFreeBSD-src-3c01e31040c2984c114ac9977789b76185e726e6.zip
FreeBSD-src-3c01e31040c2984c114ac9977789b76185e726e6.tar.gz
- Remove extraneous null ptr deref checks
- Fix memory leak Submitted by: Slono Slono <slonoman2011@yandex.ru> Approved by: jhb MFC after: 1 week
Diffstat (limited to 'usr.sbin/fwcontrol/fwcontrol.c')
-rw-r--r--usr.sbin/fwcontrol/fwcontrol.c3
1 files changed, 1 insertions, 2 deletions
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;
}
}
OpenPOWER on IntegriCloud