diff options
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/wg_user.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdep/unix/wg_user.c b/sysdep/unix/wg_user.c index 8c8f9dc4..1446d20b 100644 --- a/sysdep/unix/wg_user.c +++ b/sysdep/unix/wg_user.c @@ -262,6 +262,9 @@ wg_user_set_device(struct pool *pool, res = sk_send(sock, tbsize - size); /* Send data, <0=err, >0=ok, 0=sleep */ DBG(L_TRACE "WG: send %d", res); + if (res != 0) { + rfree(sock); + } /* abort(); */ return -1; |