mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 21:38:16 +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)
|
||||
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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user