Merge pull request #43 from thiell/create_directory_memleak

create_directory: do not redeclare variable buf
This commit is contained in:
Giuseppe Scrivano 2019-02-05 09:47:05 +01:00 committed by GitHub
commit abc4719464
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
main.c
View File

@ -1737,7 +1737,7 @@ create_directory (struct ovl_data *lo, int dirfd, const char *name, const struct
if (ret == 0 && xattr_sfd >= 0)
{
const size_t buf_size = 1 << 20;
char *buf = malloc (buf_size);
buf = malloc (buf_size);
if (buf == NULL)
{
ret = -1;