When /usr/libexec/validate_firmware_image is not present on the system
procd will hang indefinitely on the read() since the input side of the
pipe is still open.

Signed-off-by: Dustin Lundquist <d.lundqu...@temperednetworks.com>
---
system.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system.c b/system.c
index 751a016..a7ada13 100644
--- a/system.c
+++ b/system.c
@@ -425,6 +425,7 @@ static int validate_firmware_image_call(const char *file)
        }

        /* Parent process */
+       close(fds[1]);

        tok = json_tokener_new();
        if (!tok) {
@@ -447,7 +448,6 @@ static int validate_firmware_image_call(const char *file)
        }

        close(fds[0]);
-       close(fds[1]);

        err = -ENOENT;
        if (jsobj) {
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to