aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/module.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/util/module.c b/util/module.c
index 214effb39f..9fd30309ae 100644
--- a/util/module.c
+++ b/util/module.c
@@ -202,18 +202,16 @@ static void module_load(module_init_type type)
for (i = 0; i < ARRAY_SIZE(dirs); i++) {
fname = g_strdup_printf("%s/%s%s", dirs[i], *mp, HOST_DSOSUF);
ret = module_load_file(fname);
+ g_free(fname);
+ fname = NULL;
/* Try loading until loaded a module file */
if (!ret) {
break;
}
- g_free(fname);
- fname = NULL;
}
if (ret == -ENOENT) {
fprintf(stderr, "Can't find module: %s\n", *mp);
}
-
- g_free(fname);
}
for (i = 0; i < ARRAY_SIZE(dirs); i++) {