I am about to fix this issue. I read several queries regarding dlopen but still not clear. It seems dlopen is allocating memory by either calloc or malloc. But how to deallocate this memory?
Similar code pointing leak problem here for "dl"
(snip)
Event alloc_fn: Called allocation function "dlopen"
Event var_assign: Assigned variable "dl" to storage returned from "dlopen(&"libc.so.6",1)"
261 dl = dlopen("libc.so.6", RTLD_LAZY);
At conditional (1): "dl" taking true path
262 if (dl) {
Event noescape: Variable "dl" not freed or pointed-to in function "dlsym"
263 func = dlsym(dl, "fdopen");
264 }
265 assert(func != NULL);
266 }
Event leaked_storage: Variable "dl" goes out of scope
267 return (*func)(fd, mode);
(snip)
Is it a bug or we need to ignore this? If I need to fix, could any one please guide me to fix it?
Thanks, Boobesh