coverity: #1435263

Use after free Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 62a2ede0
......@@ -1534,11 +1534,12 @@ static bool prepend_lxc_header(char *path, const char *t, char *const argv[])
}
ret = sha1sum_file(tpath, md_value);
free(tpath);
if (ret < 0) {
ERROR("Failed to get sha1sum of %s", tpath);
free(tpath);
goto out_free_contents;
}
free(tpath);
#endif
f = fopen(path, "w");
......
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