aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/loader
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-05 14:52:19 +0000
committermarha <marha@users.sourceforge.net>2011-04-05 14:52:19 +0000
commit6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6 (patch)
tree02e0d5fd297602d526b582dc527e007fe20a326f /xorg-server/hw/xfree86/loader
parent1d142834bdb30308784a0654a39b7c0de7e37695 (diff)
parenteaedc21febeadad4cf0e370f5d97e7bdb4470870 (diff)
downloadvcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.tar.gz
vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.tar.bz2
vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xfree86/loader')
-rw-r--r--xorg-server/hw/xfree86/loader/loadmod.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xorg-server/hw/xfree86/loader/loadmod.c b/xorg-server/hw/xfree86/loader/loadmod.c
index 271cb5b79..3e59887db 100644
--- a/xorg-server/hw/xfree86/loader/loadmod.c
+++ b/xorg-server/hw/xfree86/loader/loadmod.c
@@ -532,6 +532,7 @@ LoaderListDirs(const char **subdirlist, const char **patternlist)
FreePathList(pathlist);
FreeSubdirs(subdirs);
FreePatterns(patterns);
+ closedir(d);
return NULL;
}
listing[n] = malloc(len + 1);
@@ -540,6 +541,7 @@ LoaderListDirs(const char **subdirlist, const char **patternlist)
FreePathList(pathlist);
FreeSubdirs(subdirs);
FreePatterns(patterns);
+ closedir(d);
return NULL;
}
strncpy(listing[n], dp->d_name + match[1].rm_so,
@@ -556,6 +558,10 @@ LoaderListDirs(const char **subdirlist, const char **patternlist)
}
if (listing)
listing[n] = NULL;
+
+ FreePathList(pathlist);
+ FreeSubdirs(subdirs);
+ FreePatterns(patterns);
return listing;
}