Merge pull request #412 from giuseppe/fix-variable-leak

main: automatically cleanup newpath
This commit is contained in:
Giuseppe Scrivano 2024-02-06 13:21:34 +01:00 committed by GitHub
commit c2dd76c6d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

2
main.c
View File

@ -1092,7 +1092,7 @@ direct_renameat2 (int olddirfd, const char *oldpath,
static int
hide_node (struct ovl_data *lo, struct ovl_node *node, bool unlink_src)
{
char *newpath = NULL;
cleanup_free char *newpath = NULL;
int ret;
ret = asprintf (&newpath, "%lu", get_next_wd_counter ());