mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
valgrind: fix leak in caps handling
This commit is contained in:
parent
a15007269e
commit
81d5899c89
1 changed files with 3 additions and 1 deletions
|
@ -294,11 +294,13 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)
|
|||
static void
|
||||
_lws_plat_apply_caps(int mode, cap_value_t *cv, int count)
|
||||
{
|
||||
cap_t caps = cap_get_proc();
|
||||
cap_t caps;
|
||||
|
||||
if (!count)
|
||||
return;
|
||||
|
||||
caps = cap_get_proc();
|
||||
|
||||
cap_set_flag(caps, mode, count, cv, CAP_SET);
|
||||
cap_set_proc(caps);
|
||||
prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue