lib/sysroot: Fix pointer going out of scope in unlock code
Fixes Coverity CID #1457317 Closes: #1249 Approved by: jlebon
This commit is contained in:
1 parent
e80efe0b06
commit
351ffdb977
1 file changed
+1
-1
@@ -1703,6 +1703,7 @@ ostree_sysroot_deployment_unlock (OstreeSysroot *self,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
const char *ovl_options = NULL;
|
const char *ovl_options = NULL;
|
||||||
|
static const char hotfix_ovl_options[] = "lowerdir=usr,upperdir=.usr-ovl-upper,workdir=.usr-ovl-work";
|
||||||
switch (unlocked_state)
|
switch (unlocked_state)
|
||||||
{
|
{
|
||||||
case OSTREE_DEPLOYMENT_UNLOCKED_NONE:
|
case OSTREE_DEPLOYMENT_UNLOCKED_NONE:
|
||||||
@@ -1710,7 +1711,6 @@ ostree_sysroot_deployment_unlock (OstreeSysroot *self,
|
|||||||
break;
|
break;
|
||||||
case OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX:
|
case OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX:
|
||||||
{
|
{
|
||||||
const char hotfix_ovl_options[] = "lowerdir=usr,upperdir=.usr-ovl-upper,workdir=.usr-ovl-work";
|
|
||||||
/* Create the overlayfs directories in the deployment root
|
/* Create the overlayfs directories in the deployment root
|
||||||
* directly for hotfixes. The ostree-prepare-root.c helper
|
* directly for hotfixes. The ostree-prepare-root.c helper
|
||||||
* is also set up to detect and mount these.
|
* is also set up to detect and mount these.
|
||||||
|
|||||||
Reference in new issue
Block a user