Commit 01efd4d3 by Serge Hallyn

coverity: correctly handle tpath error case.

parent 1fd9bd50
......@@ -910,7 +910,8 @@ bool prepend_lxc_header(char *path, const char *t, char *const argv[])
}
#if HAVE_LIBGNUTLS
if ((tpath = get_template_path(t)) < 0) {
tpath = get_template_path(t);
if (tpath == (char *) -1) {
ERROR("bad template: %s\n", t);
free(contents);
return false;
......@@ -991,7 +992,8 @@ static bool lxcapi_create(struct lxc_container *c, const char *t,
if (!c)
return false;
if ((tpath = get_template_path(t)) < 0) {
tpath = get_template_path(t);
if (tpath == (char *) -1) {
ERROR("bad template: %s\n", t);
goto out;
}
......
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