b5fd22
1305933 - snmpd leaks memory in ether like-mib implementation
b5fd22
b5fd22
commit ed4e48b5fab165d1ba4c431e31e543f808a2c25f
b5fd22
Author: Jan Safranek <jsafranek@users.sourceforge.net>
b5fd22
Date:   Wed Feb 10 14:00:12 2016 +0100
b5fd22
b5fd22
    CHANGES: snmpd: fixed memory leak in ETHERLIKE-MIB.
b5fd22
    
b5fd22
    ke->name in stdup-ed at line 297:
b5fd22
        n->name = strdup(RTA_DATA(tb[IFLA_IFNAME]));
b5fd22
b5fd22
diff --git a/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c b/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c
b5fd22
index b110950..a884bb3 100644
b5fd22
--- a/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c
b5fd22
+++ b/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c
b5fd22
@@ -463,6 +463,7 @@ _dot3Stats_netlink_get_errorcntrs(dot3StatsTable_rowreq_ctx *rowreq_ctx, const c
b5fd22
             done = 1;
b5fd22
         }
b5fd22
         kern_db = ke->next;
b5fd22
+        free(ke->name);
b5fd22
         free(ke);
b5fd22
     }
b5fd22