diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-12-05 06:42:19 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-12-05 06:42:19 +0000 |
commit | 716adb34dc0b0bdb029d5975f7a2527f150380b4 (patch) | |
tree | 074a966aceb08ca0f2763dd89f4e9b15e1256a8d /usr.sbin/snmpd/smi.c | |
parent | 0730fae5c0690606f7f653e4dcf64508150b23ea (diff) |
strings.h -> string.h to prevent an implicit declaration warning. Also
remove a handful of NULL-checks before free().
Diffstat (limited to 'usr.sbin/snmpd/smi.c')
-rw-r--r-- | usr.sbin/snmpd/smi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/snmpd/smi.c b/usr.sbin/snmpd/smi.c index 0f1bd13c13d..0777cc0e41d 100644 --- a/usr.sbin/snmpd/smi.c +++ b/usr.sbin/snmpd/smi.c @@ -175,8 +175,7 @@ smi_delete(struct oid *oid) value == oid) RB_REMOVE(oidtree, &smi_oidtree, value); - if (oid->o_data != NULL) - free(oid->o_data); + free(oid->o_data); if (oid->o_flags & OID_DYNAMIC) { free(oid->o_name); free(oid); @@ -536,8 +535,7 @@ smi_print_element(struct ber_element *root) return (str); fail: - if (str != NULL) - free(str); + free(str); return (NULL); } |