check malloc failure
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user