]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix a memory error.
authorRoy Marples <roy@marples.name>
Wed, 15 Oct 2014 18:25:59 +0000 (18:25 +0000)
committerRoy Marples <roy@marples.name>
Wed, 15 Oct 2014 18:25:59 +0000 (18:25 +0000)
ipv6nd.c

index 0fd39334b15861e085744274271c17ad926bae6c..8dfdcc0c60974f8f40839734c5ced03f63db48b5 100644 (file)
--- a/ipv6nd.c
+++ b/ipv6nd.c
@@ -1061,6 +1061,7 @@ extra_opt:
                                free(rao);
                        }
                        free(opt);
+                       free(opt2);
                        continue;
                }
 
@@ -1085,6 +1086,7 @@ extra_opt:
                if (rao && rao->type == ND_OPT_PREFIX_INFORMATION && opt2) {
                        n = _ND_OPT_PREFIX_ADDR;
                        opt = opt2;
+                       opt2 = NULL;
                        goto extra_opt;
                }
        }