wg: plug memleak in config error path
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
b0d5a8d27c
commit
723abc5098
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue