mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +00:00
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: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
9f06405082
commit
d98c19ef0e
@ -81,7 +81,7 @@ static int note_link_remap(char *path, struct ns_id *nsid)
|
|||||||
if (!rlb)
|
if (!rlb)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
rlb->path = strdup(path);
|
rlb->path = xstrdup(path);
|
||||||
if (!rlb->path)
|
if (!rlb->path)
|
||||||
goto err2;
|
goto err2;
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ static cr_plugin_desc_t *cr_gen_plugin_desc(void *h, char *path)
|
|||||||
if (!d)
|
if (!d)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
d->name = strdup(path);
|
d->name = xstrdup(path);
|
||||||
d->max_hooks = CR_PLUGIN_HOOK__MAX;
|
d->max_hooks = CR_PLUGIN_HOOK__MAX;
|
||||||
d->version = CRIU_PLUGIN_VERSION_OLD;
|
d->version = CRIU_PLUGIN_VERSION_OLD;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user