Coverity #794: Fix a highly unlikely memory leak.
This commit is contained in:
parent
116d158e85
commit
460f2ea4a5
|
@ -4,6 +4,7 @@
|
||||||
Coverity #1053: Nuke a dead variable.
|
Coverity #1053: Nuke a dead variable.
|
||||||
Coverity #269: Compare the requested ABI class against the ABI class
|
Coverity #269: Compare the requested ABI class against the ABI class
|
||||||
of the module, not the module class.
|
of the module, not the module class.
|
||||||
|
Coverity #794: Fix a highly unlikely memory leak.
|
||||||
|
|
||||||
* miext/cw/cw.c:
|
* miext/cw/cw.c:
|
||||||
Coverity #337: Remove useless NULL check.
|
Coverity #337: Remove useless NULL check.
|
||||||
|
|
|
@ -418,10 +418,6 @@ FindModule(const char *module, const char *dir, const char **subdirlist,
|
||||||
#else
|
#else
|
||||||
const char suffix[3][3] = { "a", "o", "so" };
|
const char suffix[3][3] = { "a", "o", "so" };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
subdirs = InitSubdirs(subdirlist);
|
|
||||||
if (!subdirs)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
#ifndef __EMX__
|
#ifndef __EMX__
|
||||||
dirpath = (char *)dir;
|
dirpath = (char *)dir;
|
||||||
|
@ -431,7 +427,10 @@ FindModule(const char *module, const char *dir, const char **subdirlist,
|
||||||
#endif
|
#endif
|
||||||
if (strlen(dirpath) > PATH_MAX)
|
if (strlen(dirpath) > PATH_MAX)
|
||||||
return NULL;
|
return NULL;
|
||||||
/*xf86Msg(X_INFO,"OS2DIAG: FindModule: dirpath=%s\n",dirpath); */
|
|
||||||
|
subdirs = InitSubdirs(subdirlist);
|
||||||
|
if (!subdirs)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
for (s = subdirs; *s; s++) {
|
for (s = subdirs; *s; s++) {
|
||||||
if ((dirlen = strlen(dirpath) + strlen(*s)) > PATH_MAX)
|
if ((dirlen = strlen(dirpath) + strlen(*s)) > PATH_MAX)
|
||||||
|
|
Loading…
Reference in New Issue