diff options
author | Sangwoo Moon <swmoon00@gmail.com> | 2017-09-27 16:25:15 +0900 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2017-09-27 15:01:55 +0100 |
commit | d92bf83c152ff88c2d92bd852752d4c326004400 (patch) | |
tree | 78b1a3b11ed30c904f4344f4bf765e9f08d9f85e | |
parent | 77092d95811257229727364b32e903d8b0db3792 (diff) |
Adding pointer dereferencing after calling dlsym()
dlsym() resolves the location of the loaded symbol,
therefore dlsym() returns the type (fuse_module_factory_t *), not (fuse_module_factory_t).
Added pinter dereferencing to correctly refer the factory function.
-rw-r--r-- | lib/fuse.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -263,7 +263,7 @@ static int fuse_load_so_module(const char *module) } sprintf(tmp, "fuse_module_%s_factory", module); - factory = dlsym(so->handle, tmp); + factory = *((fuse_module_factory_t *) dlsym(so->handle, tmp)); if (factory == NULL) { fprintf(stderr, "fuse: symbol <%s> not found in module: %s\n", tmp, dlerror()); |