- cleanup memory if opening aliases failed and cleanup was requested.

(r15107 from trunk)
1_1_stable
Bernhard Reutner-Fischer 2006-05-19 11:25:30 +00:00
parent edc9e373d9
commit 7107a2f38c
1 changed files with 4 additions and 4 deletions

View File

@ -290,15 +290,15 @@ static struct dep_t *build_dep ( void )
}
filename = bb_xasprintf("/lib/modules/%s/modules.dep", un.release );
if (( fd = open ( filename, O_RDONLY )) < 0 ) {
fd = open ( filename, O_RDONLY );
if (ENABLE_FEATURE_CLEAN_UP)
free(filename);
if (fd < 0) {
/* Ok, that didn't work. Fall back to looking in /lib/modules */
if (( fd = open ( "/lib/modules/modules.dep", O_RDONLY )) < 0 ) {
return 0;
}
}
free(filename);
while ( reads ( fd, buffer, sizeof( buffer ))) {
int l = bb_strlen ( buffer );