coverity: #1435263

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