Coverity points out that we have a memory leak from
`g_strdup(dir_or_file_path)`. Make the duplication of the string a
temporary variable that is freed using `g_autofree`.
return glnx_throw_errno_prefix (error, "openat(O_DIRECTORY)");
else
{
- g_autofree char *dir = dirname (g_strdup (dir_or_file_path));
+ g_autofree char *tmpbuf = g_strdup (dir_or_file_path);
+ const char *dir = dirname (tmpbuf);
basename = g_path_get_basename (dir_or_file_path);
if (!glnx_opendirat (AT_FDCWD, dir, TRUE, &dfd, error))