Avoid a memory leak pointed out by Lucas C. Villa Real.
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)
No binary (build failed)
—
(log yok)
| @@ -388,15 +388,14 @@ 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 = strlen ( buffer ); | |