valgrind reported that lo.source is leaked on quiting, but it was defined
as (const char*) as it may point to a const string "/".
Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
Reviewed-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
int writeback;
int flock;
int xattr;
- const char *source;
+ char *source;
double timeout;
int cache;
int timeout_set;
fuse_log(FUSE_LOG_ERR, "source is not a directory\n");
exit(1);
}
-
} else {
- lo.source = "/";
+ lo.source = strdup("/");
}
if (!lo.timeout_set) {
switch (lo.cache) {
close(lo.root.fd);
}
+ free(lo.source);
+
return ret ? 1 : 0;
}