]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: #1426029
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 9 Dec 2017 17:27:25 +0000 (18:27 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 11 Dec 2017 11:02:34 +0000 (12:02 +0100)
fix use after free

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/storage/overlay.c

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