Commit 1ef50607 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

cgroup: Use xmalloc in rewrite_cgsets

We prefer x* helpers because they print error
in case of allocation failures.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent c01efda8
......@@ -1244,7 +1244,7 @@ static int rewrite_cgsets(CgroupEntry *cge, char **controllers, int n_controller
/* +1 for trailing NULL */
int newlen = strlen(to) + strlen(cg->path + off) + 1;
char *m = malloc(newlen * sizeof(char*));
char *m = xmalloc(newlen * sizeof(char*));
if (!m)
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment