check malloc failure

This commit is contained in:
2026-05-19 21:21:45 +01:00
parent 0b9189a412
commit eaede95bac
+3
View File
@@ -216,6 +216,9 @@ int main(int argc, char **argv)
int len = recvmsg(socket, &msg , 0);
int *peer_fds = fds_from_msg(&msg, 5);
char *argline = malloc(len);
if(! argline) {
die("malloc failed");
}
memmove(argline, buf, len);
pid_t child_pid = fork_lua(L, argline, len, peer_fds, 5);