mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 02:27:51 +00:00
Close fd of erroneous daemon socket connections
This commit is contained in:
parent
e86db0bd61
commit
9474750bdf
@ -447,12 +447,15 @@ int connect_daemon(int req, bool create) {
|
||||
break;
|
||||
case MainResponse::ERROR:
|
||||
LOGE("Daemon error\n");
|
||||
close(fd);
|
||||
return -1;
|
||||
case MainResponse::ROOT_REQUIRED:
|
||||
LOGE("Root is required for this operation\n");
|
||||
close(fd);
|
||||
return -1;
|
||||
case MainResponse::ACCESS_DENIED:
|
||||
LOGE("Access denied\n");
|
||||
close(fd);
|
||||
return -1;
|
||||
default:
|
||||
__builtin_unreachable();
|
||||
|
Loading…
x
Reference in New Issue
Block a user