mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
cap_unwrap should return a descriptor but also free the structure.
This commit is contained in:
parent
77ba0dab06
commit
40905ec6bb
1 changed files with 9 additions and 1 deletions
|
|
@ -122,7 +122,15 @@ cap_wrap(int sock)
|
|||
#ifdef WITH_CASPER
|
||||
int cap_unwrap(cap_channel_t *chan);
|
||||
#else
|
||||
#define cap_unwrap(chan) (chan->cch_fd)
|
||||
static inline int
|
||||
cap_unwrap(cap_channel_t *chan)
|
||||
{
|
||||
int fd;
|
||||
|
||||
fd = chan->cch_fd;
|
||||
free(chan);
|
||||
return (fd);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue