summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fuse/guestmount.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fuse/guestmount.c b/fuse/guestmount.c
index c7220c08..d45c18bd 100644
--- a/fuse/guestmount.c
+++ b/fuse/guestmount.c
@@ -360,8 +360,10 @@ fg_readlink (const char *path, char *buf, size_t size)
memcpy (buf, r, len);
buf[len] = '\0';
- if (free_it)
- free ((char *) r);
+ if (free_it) {
+ char *tmp = (char *) r;
+ free (tmp);
+ }
return 0;
}