Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26939
b: refs/heads/master
c: f41d5bb
h: refs/heads/master
i:
  26937: f7ceee7
  26935: d83221d
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed May 22, 2006
1 parent 22ab167 commit 0a96e02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f5565f4a90bdfea99e4bcd8411ff5272ebdbdbf8
refs/heads/master: f41d5bb1d9f49b03af7126d07a511facbe283a92
15 changes: 7 additions & 8 deletions trunk/net/ipv4/netfilter/ip_nat_snmp_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,12 +1003,12 @@ static unsigned char snmp_trap_decode(struct asn1_ctx *ctx,

return 1;

err_addr_free:
kfree((unsigned long *)trap->ip_address);

err_id_free:
kfree(trap->id);

err_addr_free:
kfree((unsigned long *)trap->ip_address);

return 0;
}

Expand Down Expand Up @@ -1126,11 +1126,10 @@ static int snmp_parse_mangle(unsigned char *msg,
struct snmp_v1_trap trap;
unsigned char ret = snmp_trap_decode(&ctx, &trap, map, check);

/* Discard trap allocations regardless */
kfree(trap.id);
kfree((unsigned long *)trap.ip_address);

if (!ret)
if (ret) {
kfree(trap.id);
kfree((unsigned long *)trap.ip_address);
} else
return ret;

} else {
Expand Down

0 comments on commit 0a96e02

Please sign in to comment.