2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 09:59:34 +00:00

Merge pull request #950 from brauner/2016-04-06/fix_memory_leak

lxc_mount_auto_mounts(): free memory on failure
This commit is contained in:
Stéphane Graber
2016-04-06 09:38:35 -04:00

View 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 */