]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/ip_options.c
[IPV6] XFRM: Fix decoding session with preceding extension header(s).
[linux-2.6-omap-h63xx.git] / net / ipv4 / ip_options.c
index bce4e875193be1d596c4c607ab42e9e1f966513f..9bebad07bf2ec4baea772a654e7d37808504928c 100644 (file)
@@ -11,6 +11,7 @@
  *             
  */
 
+#include <linux/capability.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <asm/uaccess.h>
@@ -22,6 +23,7 @@
 #include <net/sock.h>
 #include <net/ip.h>
 #include <net/icmp.h>
+#include <net/route.h>
 
 /* 
  * Write options to IP header, record destination address to
@@ -510,8 +512,7 @@ static int ip_options_get_finish(struct ip_options **optp,
                kfree(opt);
                return -EINVAL;
        }
-       if (*optp)
-               kfree(*optp);
+       kfree(*optp);
        *optp = opt;
        return 0;
 }