]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc_mount_auto_mounts(): free memory on failure
authorChristian Brauner <christian.brauner@mailbox.org>
Wed, 6 Apr 2016 11:08:06 +0000 (13:08 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 17 Nov 2016 23:17:05 +0000 (18:17 -0500)
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
src/lxc/conf.c

index 754c54d251c3e69d75433a816619b32014a5cfc3..6a019aac29950894ffb42ce40afd881f0a088b1d 100644 (file)
@@ -790,6 +790,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
                        }
                        if (!default_mounts[i].destination) {
                                ERROR("BUG: auto mounts destination %d was NULL", i);
+                               free(source);
                                return -1;
                        }
                        /* will act like strdup if %r is not present */