2
0
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:
Ruslan Kuprieiev
2013-09-24 11:18:51 +04:00
committed by Pavel Emelyanov
parent bc5828c111
commit 3f9478d68c

View File

@@ -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) {