mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-22 17:49:13 +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
2 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue