aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ipv6.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2008-06-10 15:39:35 -0400
committerDavid S. Miller <davem@davemloft.net>2008-06-10 15:39:35 -0400
commitce4a7d0d48bbaed78ccbb0bafb9229651a40303a (patch)
treedf8770ef69c71a0d6935154add3ff3f4bb8dbc3a /include/linux/ipv6.h
parent45d465bc237ab1e1ebb4c65b9b318830dafb7509 (diff)
inet{6}_request_sock: Init ->opt and ->pktopts in the constructor
Wei Yongjun noticed that we may call reqsk_free on request sock objects where the opt fields may not be initialized, fix it by introducing inet_reqsk_alloc where we initialize ->opt to NULL and set ->pktopts to NULL in inet6_reqsk_alloc. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ipv6.h')
-rw-r--r--include/linux/ipv6.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 10b666b61add..cde056e08181 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -396,8 +396,10 @@ static inline struct request_sock *inet6_reqsk_alloc(struct request_sock_ops *op
396{ 396{
397 struct request_sock *req = reqsk_alloc(ops); 397 struct request_sock *req = reqsk_alloc(ops);
398 398
399 if (req != NULL) 399 if (req != NULL) {
400 inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); 400 inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req);
401 inet6_rsk(req)->pktopts = NULL;
402 }
401 403
402 return req; 404 return req;
403} 405}