fix use after free

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2017-12-09 18:27:25 +01:00
parent ed20740bca
commit b44c0a6787
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -207,8 +207,8 @@ int ovl_clonepaths(struct lxc_storage *orig, struct lxc_storage *new, const char
odelta = strchr(nsrc, ':'); odelta = strchr(nsrc, ':');
if (!odelta) { if (!odelta) {
free(osrc);
ERROR("Failed to find \":\" in \"%s\"", nsrc); ERROR("Failed to find \":\" in \"%s\"", nsrc);
free(osrc);
return -22; return -22;
} }