X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fipv4%2Fip_options.c;h=6d89f3f3e70193042ee8873834e57875bc20abba;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=461bbd032f34675d7b339ba79a8804279caaac09;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index 461bbd032..6d89f3f3e 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c @@ -515,6 +515,8 @@ int ip_options_get(struct ip_options **optp, unsigned char *data, int optlen, in kfree(opt); return -EINVAL; } + if (*optp) + kfree(*optp); *optp = opt; return 0; }