aboutsummaryrefslogtreecommitdiff
path: root/src/rc/rc-plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc/rc-plugin.c')
-rw-r--r--src/rc/rc-plugin.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rc/rc-plugin.c b/src/rc/rc-plugin.c
index f0ee5a61..034f79d2 100644
--- a/src/rc/rc-plugin.c
+++ b/src/rc/rc-plugin.c
@@ -79,7 +79,7 @@ void rc_plugin_load(void)
DIR *dp;
struct dirent *d;
PLUGIN *plugin;
- char *p;
+ char file[PATH_MAX];
void *h;
int (*fptr)(RC_HOOK, const char *);
@@ -96,9 +96,8 @@ void rc_plugin_load(void)
if (d->d_name[0] == '.')
continue;
- p = rc_strcatpaths(RC_PLUGINDIR, d->d_name, NULL);
- h = dlopen(p, RTLD_LAZY);
- free(p);
+ snprintf(file, sizeof(file), RC_PLUGINDIR "/%s", d->d_name);
+ h = dlopen(file, RTLD_LAZY);
if (! h) {
eerror("dlopen: %s", dlerror());
continue;