mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-03 05:18:24 +03:00
sysroot: Make coverity happy with dirname+strdup
Similar to d528083cae
- I don't
believe we actually had a leak here because `dirname` always
returns the same start pointer, but this makes Coverity
happy.
Signed-off-by: Colin Walters <walters@verbum.org>
This commit is contained in:
parent
0d5e554b69
commit
70430fe02b
@ -2243,7 +2243,8 @@ ostree_sysroot_deployment_unlock (OstreeSysroot *self, OstreeDeployment *deploym
|
|||||||
deployment, _OSTREE_SYSROOT_DEPLOYMENT_RUNSTATE_FLAG_DEVELOPMENT)
|
deployment, _OSTREE_SYSROOT_DEPLOYMENT_RUNSTATE_FLAG_DEVELOPMENT)
|
||||||
: _ostree_sysroot_get_runstate_path (
|
: _ostree_sysroot_get_runstate_path (
|
||||||
deployment, _OSTREE_SYSROOT_DEPLOYMENT_RUNSTATE_FLAG_TRANSIENT);
|
deployment, _OSTREE_SYSROOT_DEPLOYMENT_RUNSTATE_FLAG_TRANSIENT);
|
||||||
g_autofree char *devpath_parent = dirname (g_strdup (devpath));
|
g_autofree char *devpath_parent_owned = g_strdup (devpath);
|
||||||
|
const char *devpath_parent = dirname (devpath_parent_owned);
|
||||||
|
|
||||||
if (!glnx_shutil_mkdir_p_at (AT_FDCWD, devpath_parent, 0755, cancellable, error))
|
if (!glnx_shutil_mkdir_p_at (AT_FDCWD, devpath_parent, 0755, cancellable, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user