Skip to contentSkip to conversation

Fix memory leak in cleanup_ipv6_mibs()

PATCH Applied Pavel Emelyanov 3 participants 3 messages Oct 17, 2007 – Oct 18, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix memory leak in cleanup_ipv6_mibs()

The icmpv6msg mib statistics is not freed.

This is almost not critical for current kernel, since ipv6 module is unloadable, but this can happen on load error and will happen every time we stop the network namespace (when we have one, of course).

---

net/ipv6/af_inet6.c +1 -0
index bc92938..1b1caf3 100644
@@ -747,6 +747,7 @@ static void cleanup_ipv6_mibs(void)
 {
 	snmp_mib_free((void **)ipv6_statistics);
 	snmp_mib_free((void **)icmpv6_statistics);
+	snmp_mib_free((void **)icmpv6msg_statistics);
 	snmp_mib_free((void **)udp_stats_in6);
 	snmp_mib_free((void **)udplite_stats_in6);
 }
Acked-by on v1 1/1
#1 lore raw
Quoted 20 lines

---

net/ipv6/af_inet6.c +1 -1
index bc92938..1b1caf3 100644
@@ -747,6 +747,7 @@ static void cleanup_ipv6_mibs(void)
 {
    snmp_mib_free((void **)ipv6_statistics);
    snmp_mib_free((void **)icmpv6_statistics);
+   snmp_mib_free((void **)icmpv6msg_statistics);
    snmp_mib_free((void **)udp_stats_in6);
    snmp_mib_free((void **)udplite_stats_in6);
 }
-

To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html