lib/c: fix coverity DEADCODE

criu-3.12/lib/c/criu.c:869: dead_error_line: Execution cannot reach this
statement: "free(ptr);".

criu-3.12/lib/c/criu.c:906: dead_error_line: Execution cannot reach this
statement: "free(ptr);".

Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2019-05-15 14:24:37 +00:00 committed by Andrei Vagin
parent 27dd87e99a
commit fe1c72a098

View file

@ -866,8 +866,6 @@ int criu_local_add_enable_fs(criu_opts *opts, const char *fs)
err:
if (str)
free(str);
if (ptr)
free(ptr);
return -ENOMEM;
}
@ -903,8 +901,6 @@ int criu_local_add_skip_mnt(criu_opts *opts, const char *mnt)
err:
if (str)
free(str);
if (ptr)
free(ptr);
return -ENOMEM;
}