[PATCH] fix uloop initialization

Leon M. Busch-George leon at georgemail.eu
Sun Nov 27 00:38:09 PST 2022


uloop_init is already called in main.
uloop_done is just missing.

Signed-off-by: Leon M. Busch-George <leon at georgemail.eu>
---
 dev.c  | 2 --
 main.c | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev.c b/dev.c
index bd10207..9eb7209 100644
--- a/dev.c
+++ b/dev.c
@@ -353,8 +353,6 @@ int qmi_device_open(struct qmi_dev *qmi, const char *path)
 	struct ustream *us = &qmi->sf.stream;
 	int fd;
 
-	uloop_init();
-
 	fd = open(path, O_RDWR | O_EXCL | O_NONBLOCK | O_NOCTTY);
 	if (fd < 0)
 		return -1;
diff --git a/main.c b/main.c
index aa4634c..e3ccf08 100644
--- a/main.c
+++ b/main.c
@@ -168,5 +168,7 @@ int main(int argc, char **argv)
 
 	qmi_device_close(&dev);
 
+	uloop_done();
+
 	return ret;
 }
-- 
2.38.1




More information about the openwrt-devel mailing list