diff options
author | Volodymyr Brynza <v.brynza@samsung.com> | 2016-12-14 14:32:26 +0200 |
---|---|---|
committer | Volodymyr Brynza <v.brynza@samsung.com> | 2016-12-14 14:32:26 +0200 |
commit | b6a583e98aaa2b09fb2d54dbf198684831d82694 (patch) | |
tree | 4e94443d5bb4747cf97451f3a9c889b51aac62b5 /src/common | |
parent | 3b82a369364544fe41127c9d84d7076975c6f221 (diff) | |
download | murphy-b6a583e98aaa2b09fb2d54dbf198684831d82694.tar.gz murphy-b6a583e98aaa2b09fb2d54dbf198684831d82694.tar.bz2 murphy-b6a583e98aaa2b09fb2d54dbf198684831d82694.zip |
Fix fd leak
Change-Id: Ib2f8153d2a8e13bc8f0edf6cbbc2ecf3de274044
Signed-off-by: Volodymyr Brynza <v.brynza@samsung.com>
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/socket-utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/socket-utils.c b/src/common/socket-utils.c index 4f7d957..236ba91 100644 --- a/src/common/socket-utils.c +++ b/src/common/socket-utils.c @@ -99,3 +99,9 @@ int mrp_reject_connection(int sock, struct sockaddr *addr, socklen_t *alen) return (fd >= 0 ? 0 : -1); } + +MRP_EXIT static void mrp_close_reserved_fd() +{ + if (reject_fd > 0) + close(reject_fd); +} |