projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a150072
)
valgrind: fix leak in caps handling
author
Andy Green
<andy@warmcat.com>
Sat, 15 Jul 2017 09:50:24 +0000
(17:50 +0800)
committer
Andy Green
<andy@warmcat.com>
Tue, 18 Jul 2017 20:10:36 +0000
(
04:10
+0800)
lib/lws-plat-unix.c
patch
|
blob
|
history
diff --git
a/lib/lws-plat-unix.c
b/lib/lws-plat-unix.c
index
a2284f4
..
07b7edc
100644
(file)
--- a/
lib/lws-plat-unix.c
+++ b/
lib/lws-plat-unix.c
@@
-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)
{
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;
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);
cap_set_flag(caps, mode, count, cv, CAP_SET);
cap_set_proc(caps);
prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);