]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc_mount_auto_mounts(): free memory on failure 950/head
authorChristian Brauner <christian.brauner@mailbox.org>
Wed, 6 Apr 2016 11:08:06 +0000 (13:08 +0200)
committerChristian Brauner <christian.brauner@mailbox.org>
Wed, 6 Apr 2016 11:08:06 +0000 (13:08 +0200)
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
src/lxc/conf.c

index ff2bcf33e431c352881716ffc547211c117c5cbc..3b023efea3ccaa7c2ced292c60361ee2b2404837 100644 (file)
@@ -719,6 +719,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 */