mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
service: check errors of xmalloc
Original-patch-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
bc5828c111
commit
3f9478d68c
@@ -215,7 +215,9 @@ int cr_service(bool daemon_mode)
|
||||
socklen_t server_addr_len;
|
||||
socklen_t client_addr_len;
|
||||
|
||||
cr_service_client = malloc(sizeof(struct _cr_service_client));
|
||||
cr_service_client = xmalloc(sizeof(struct _cr_service_client));
|
||||
if (cr_service_client == NULL)
|
||||
goto err;
|
||||
|
||||
server_fd = socket(AF_LOCAL, SOCK_SEQPACKET, 0);
|
||||
if (server_fd == -1) {
|
||||
|
Reference in New Issue
Block a user