_clean_linker_probes();
+ /* We use get_dentry only once, so use put dentry also only once */
if (_handler_fixup.dentry != NULL ||
_handler_reloc.dentry != NULL) {
if (_handler_fixup.dentry != NULL)
swap_put_dentry(_handler_fixup.dentry);
else
swap_put_dentry(_handler_reloc.dentry);
+ _handler_reloc.dentry = NULL;
+ _handler_fixup.dentry = NULL;
}
}
struct dentry *dentry;
int ret;
- if (handler_dentry != NULL)
+ if (handler_dentry != NULL) {
swap_put_dentry(handler_dentry);
+ handler_dentry = NULL;
+ }
dentry = swap_get_dentry(path);
pc_exit();
pd_exit();
- if (handler_dentry != NULL)
+ if (handler_dentry != NULL) {
swap_put_dentry(handler_dentry);
+ handler_dentry = NULL;
+ }
}
SWAP_LIGHT_INIT_MODULE(NULL, pm_init, pm_exit, NULL, NULL);
struct dentry *dentry;
int ret;
- if (uihv_dentry != NULL)
+ if (uihv_dentry != NULL) {
swap_put_dentry(uihv_dentry);
+ uihv_dentry = NULL;
+ }
dentry = swap_get_dentry(path);
if (dentry == NULL) {
static void uihv_exit(void)
{
- if (uihv_dentry != NULL)
+ if (uihv_dentry != NULL) {
swap_put_dentry(uihv_dentry);
+ uihv_dentry = NULL;
+ }
uihv_dfs_exit();
}