From: Roy Marples Date: Fri, 12 Feb 2016 19:37:02 +0000 (+0000) Subject: Fix a potential memory leak if strdup fails, [6d370974e2] X-Git-Tag: v6.10.2~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56d0a93b1a3c83ca74baa12d557c404ec995e12b;p=thirdparty%2Fdhcpcd.git Fix a potential memory leak if strdup fails, [6d370974e2] --- diff --git a/if-options.c b/if-options.c index 3710cadc..9097fa0d 100644 --- a/if-options.c +++ b/if-options.c @@ -1137,6 +1137,7 @@ 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__); return -1; }