← Commit list

e3c150bc6

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2006-05-19
SOURCE BUG Duration: 69s

Subject

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

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

modutils/modprobe.c+9 -8
@@ -364,8 +364,8 @@ static void include_conf ( struct dep_t **first, struct dep_t **current, char *b
}
/*
- * This function builds a list of dependency rules from /lib/modules/`uname -r\modules.dep.
- * It then fills every modules and aliases with their default options, found by parsing
+ * This function builds a list of dependency rules from /lib/modules/`uname -r`\modules.dep.
+ * It then fills every modules and aliases with their default options, found by parsing
* modprobe.conf (or modules.conf, or conf.modules).
*/
static struct dep_t *build_dep ( void )
@@ -389,7 +389,8 @@ static struct dep_t *build_dep ( void )
filename = bb_xasprintf("/lib/modules/%s/modules.dep", un.release );
fd = open ( filename, O_RDONLY );
- if (ENABLE_FEATURE_CLEAN_UP) free(filename);
+ 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 ) {
@@ -552,16 +553,16 @@ static struct dep_t *build_dep ( void )
include_conf (&first, &current, buffer, sizeof(buffer), fd);
close(fd);
- filename = bb_xasprintf("/lib/modules/%s/modules.alias", un.release );
-
- if (( fd = open ( filename, O_RDONLY )) < 0 ) {
-
+ filename = bb_xasprintf("/lib/modules/%s/modules.alias", un.release);
+ 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.alias", O_RDONLY )) < 0 ) {
return first;
}
}
- free(filename);
include_conf (&first, &current, buffer, sizeof(buffer), fd);
close(fd);