From: Roy Marples Date: Wed, 30 Apr 2014 09:50:00 +0000 (+0000) Subject: Fix some possible leaks. X-Git-Tag: v6.4.0~86 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a8c8e686c85e9a1aa0b1c9e5ad429909f85b268e;p=thirdparty%2Fdhcpcd.git Fix some possible leaks. --- diff --git a/dhcp-common.c b/dhcp-common.c index 5b8d15f4..d877436a 100644 --- a/dhcp-common.c +++ b/dhcp-common.c @@ -80,6 +80,7 @@ dhcp_vendor(char *str, size_t len) p += l; len -= (size_t)l; l = if_machinearch(p, len); + p += l; return (size_t)(p - str); } diff --git a/if-options.c b/if-options.c index 087d2af0..90a28a29 100644 --- a/if-options.c +++ b/if-options.c @@ -1675,6 +1675,7 @@ err_sla: token = malloc(sizeof(*token)); if (token == NULL) { syslog(LOG_ERR, "%s: %m", __func__); + free(token); return -1; } if (parse_uint32(&token->secretid, arg) == -1) { @@ -1693,6 +1694,7 @@ err_sla: s = parse_string(NULL, 0, arg); if (s == -1) { syslog(LOG_ERR, "realm_len: %m"); + free(token); return -1; } if (s) {