wg: plug memleak in config error path

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2018-01-18 11:24:04 +01:00
parent b0d5a8d27c
commit 723abc5098
1 changed files with 1 additions and 0 deletions

View File

@ -310,6 +310,7 @@ static inline bool parse_allowedips(struct wgpeer *peer, struct wgallowedip **la
} }
if (!parse_ip(new_allowedip, ip)) { if (!parse_ip(new_allowedip, ip)) {
free(new_allowedip);
free(saved_entry); free(saved_entry);
free(mutable); free(mutable);
return false; return false;