aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/loader
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-25 08:32:21 +0100
committermarha <marha@users.sourceforge.net>2011-11-25 08:32:21 +0100
commit849d328b25c2f3c87d539e1fe7af38e7580a0409 (patch)
tree349c425a87ddb3aaa1d7832d5a8e68252fc73ddb /xorg-server/hw/xfree86/loader
parenta8a12d4c8be177f63cae7dc96c2b52f09e228a76 (diff)
parenta0b4a1330be6a36ad095222d2ea83927cd33514d (diff)
downloadvcxsrv-849d328b25c2f3c87d539e1fe7af38e7580a0409.tar.gz
vcxsrv-849d328b25c2f3c87d539e1fe7af38e7580a0409.tar.bz2
vcxsrv-849d328b25c2f3c87d539e1fe7af38e7580a0409.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/glx/glxdriswrast.c xorg-server/glx/single2.c xorg-server/hw/xwin/winconfig.c xorg-server/os/osinit.c xorg-server/os/xdmcp.c xorg-server/xkb/xkbInit.c
Diffstat (limited to 'xorg-server/hw/xfree86/loader')
-rw-r--r--xorg-server/hw/xfree86/loader/loadmod.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/xorg-server/hw/xfree86/loader/loadmod.c b/xorg-server/hw/xfree86/loader/loadmod.c
index a21f43d63..c697d74ed 100644
--- a/xorg-server/hw/xfree86/loader/loadmod.c
+++ b/xorg-server/hw/xfree86/loader/loadmod.c
@@ -437,14 +437,11 @@ FindModule(const char *module, const char *dirname, const char **subdirlist,
PatternPtr patterns)
{
char buf[PATH_MAX + 1];
- char *dirpath = NULL;
char *name = NULL;
- int dirlen;
const char **subdirs = NULL;
const char **s;
- dirpath = (char *)dirname;
- if (strlen(dirpath) > PATH_MAX)
+ if (strlen(dirname) > PATH_MAX)
return NULL;
subdirs = InitSubdirs(subdirlist);
@@ -452,17 +449,15 @@ FindModule(const char *module, const char *dirname, const char **subdirlist,
return NULL;
for (s = subdirs; *s; s++) {
- if ((dirlen = strlen(dirpath) + strlen(*s)) > PATH_MAX)
+ if ((strlen(dirname) + strlen(*s)) > PATH_MAX)
continue;
- strcpy(buf, dirpath);
+ strcpy(buf, dirname);
strcat(buf, *s);
if ((name = FindModuleInSubdir(buf, module)))
break;
}
FreeSubdirs(subdirs);
- if (dirpath != dirname)
- free(dirpath);
return name;
}