From: Roy Marples Date: Thu, 21 Jul 2016 08:50:48 +0000 (+0000) Subject: Free after logging error incase free generates an error. X-Git-Tag: v6.11.2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66ca918ff743157e3704f4bbc41a41b1ae520bec;p=thirdparty%2Fdhcpcd.git Free after logging error incase free generates an error. --- diff --git a/if-options.c b/if-options.c index 289b3bad..4e7ad72f 100644 --- a/if-options.c +++ b/if-options.c @@ -1176,8 +1176,8 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo, } nconf = realloc(ifo->config, sizeof(char *) * (dl + 2)); if (nconf == NULL) { - free(p); logger(ctx, LOG_ERR, "%s: %m", __func__); + free(p); return -1; } ifo->config = nconf;