Merge pull request #2385 from 2xsec/coverity

coverity: #1425836
This commit is contained in:
Christian Brauner 2018-06-08 11:12:28 +02:00 committed by GitHub
commit 21e20322cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4470,8 +4470,11 @@ on_error:
if (pid > 0) if (pid > 0)
ret = wait_for_pid(pid); ret = wait_for_pid(pid);
if (idmap) if (idmap) {
lxc_free_idmap(idmap); lxc_free_idmap(idmap);
free(idmap);
}
if (host_uid_map && (host_uid_map != container_root_uid)) if (host_uid_map && (host_uid_map != container_root_uid))
free(host_uid_map); free(host_uid_map);
if (host_gid_map && (host_gid_map != container_root_gid)) if (host_gid_map && (host_gid_map != container_root_gid))