Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 311670f3 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller
Browse files

netfilter: snmp nat leaks memory in case of failure

parent 6def1eb4
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -742,6 +742,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
			*obj = kmalloc(sizeof(struct snmp_object) + len,
			*obj = kmalloc(sizeof(struct snmp_object) + len,
				       GFP_ATOMIC);
				       GFP_ATOMIC);
			if (*obj == NULL) {
			if (*obj == NULL) {
				kfree(p);
				kfree(id);
				kfree(id);
				if (net_ratelimit())
				if (net_ratelimit())
					printk("OOM in bsalg (%d)\n", __LINE__);
					printk("OOM in bsalg (%d)\n", __LINE__);