mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-09 03:35:20 +00:00
tools: fix unitialized variable
Closes #2242. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
5b66b6ee3e
commit
9104c79a1d
@ -745,7 +745,7 @@ static char *mount_tmpfs(const char *oldname, const char *newname,
|
|||||||
int ret, fd;
|
int ret, fd;
|
||||||
size_t len;
|
size_t len;
|
||||||
char *premount = NULL;
|
char *premount = NULL;
|
||||||
FILE *fp;
|
FILE *fp = NULL;
|
||||||
|
|
||||||
if (arg->tmpfs && arg->keepdata) {
|
if (arg->tmpfs && arg->keepdata) {
|
||||||
fprintf(stderr, "%s\n",
|
fprintf(stderr, "%s\n",
|
||||||
@ -810,7 +810,7 @@ static char *mount_tmpfs(const char *oldname, const char *newname,
|
|||||||
err_close:
|
err_close:
|
||||||
if (fd > 0)
|
if (fd > 0)
|
||||||
close(fd);
|
close(fd);
|
||||||
else
|
else if (fp)
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
err_free:
|
err_free:
|
||||||
free(premount);
|
free(premount);
|
||||||
|
Loading…
Reference in New Issue
Block a user