initctl: fix reload segfault regression introduced in e2f6ac0

Found thanks to the new unit test suite \o/

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-02-28 22:57:14 +01:00
1 parent 7f6ccfabb2
commit 1b05220376
1 file changed
+2 -1
+2 -1
View File
@@ -175,7 +175,8 @@ static int do_svc(int cmd, char *arg)
.cmd = cmd,
};
strlcpy(rq.data, arg, sizeof(rq.data));
if (arg)
strlcpy(rq.data, arg, sizeof(rq.data));
return client_send(&rq, sizeof(rq));
}