blob: 852807ddc96f1426cf337cab108ef166e924bdad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/12/08 12:39:15-08:00 davem@nuts.davemloft.net
# [IPV4]: Do not leak IP options.
#
# If the user makes ip_cmsg_send call ip_options_get
# multiple times, we leak kmalloced IP options data.
#
# Noticed by Georgi Guninski.
#
# Signed-off-by: David S. Miller <davem@davemloft.net>
#
# net/ipv4/ip_options.c
# 2004/12/08 12:38:09-08:00 davem@nuts.davemloft.net +2 -0
# [IPV4]: Do not leak IP options.
#
diff -Nru a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
--- a/net/ipv4/ip_options.c 2005-02-15 11:47:16 -08:00
+++ b/net/ipv4/ip_options.c 2005-02-15 11:47:16 -08:00
@@ -515,6 +515,8 @@
kfree(opt);
return -EINVAL;
}
+ if (*optp)
+ kfree(*optp);
*optp = opt;
return 0;
}
|