Commit d98c19ef authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

Use xstrdup whether possible

Using xstrdup lets us have an error message printed if malloc() fails.

travis-ci: success for Assorted nitpicks
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 9f064050
......@@ -81,7 +81,7 @@ static int note_link_remap(char *path, struct ns_id *nsid)
if (!rlb)
goto err;
rlb->path = strdup(path);
rlb->path = xstrdup(path);
if (!rlb->path)
goto err2;
......
......@@ -29,7 +29,7 @@ static cr_plugin_desc_t *cr_gen_plugin_desc(void *h, char *path)
if (!d)
return NULL;
d->name = strdup(path);
d->name = xstrdup(path);
d->max_hooks = CR_PLUGIN_HOOK__MAX;
d->version = CRIU_PLUGIN_VERSION_OLD;
......
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