]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix potential memory loss.
authorRoy Marples <roy@marples.name>
Fri, 28 Feb 2014 20:37:06 +0000 (20:37 +0000)
committerRoy Marples <roy@marples.name>
Fri, 28 Feb 2014 20:37:06 +0000 (20:37 +0000)
platform-linux.c

index 2b5e142f2228d2280d89088cd3f054136db74229..468f3fde4b1827139c3090b13762185fd5ab49af 100644 (file)
@@ -197,6 +197,7 @@ check_ipv6(struct dhcpcd_ctx *ctx, const char *ifname, int own)
                            (ctx->ra_restore_len + 1) * sizeof(char *));
                        if (nrest == NULL) {
                                syslog(LOG_ERR, "%s: %m", __func__);
+                               free(p);
                                return ra;
                        }
                        ctx->ra_restore = nrest;