diff options
author | marha <marha@users.sourceforge.net> | 2011-11-25 08:22:48 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-11-25 08:22:48 +0100 |
commit | a0b4a1330be6a36ad095222d2ea83927cd33514d (patch) | |
tree | 616920ca608751e843c92c9815069f43789e3097 /xorg-server/hw/xfree86/loader | |
parent | 45710577f374972946a8eb37833a9c94e5a299bf (diff) | |
download | vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.gz vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.bz2 vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.zip |
mesa xserver pixman git update 25 nov 2011
Diffstat (limited to 'xorg-server/hw/xfree86/loader')
-rw-r--r-- | xorg-server/hw/xfree86/loader/loadmod.c | 11 |
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; } |