This change is bogus. fuse_module_factory_t is already a pointer
type. Additionally, if dlsym returns NULL, then you will be
dereferencing it causing a segfault. In my testing, a segfault will
happen even if dlsym returns successfully.
Thanks to Michael Theall for spotting!
}
sprintf(tmp, "fuse_module_%s_factory", module);
- factory = *((fuse_module_factory_t *) dlsym(so->handle, tmp));
+ *(void**)(&factory) = dlsym(so->handle, tmp);
if (factory == NULL) {
fprintf(stderr, "fuse: symbol <%s> not found in module: %s\n",
tmp, dlerror());