Commit 358857ee authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

net: check that open_image() doesn't return NULL

Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent d469c5f8
......@@ -415,6 +415,8 @@ static int restore_nf_ct(int pid, int type)
struct cr_img *img;
img = open_image(type, O_RSTR, pid);
if (img == NULL)
return -1;
if (empty_image(img)) {
close_image(img);
return 0;
......
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