Skip to contentSkip to conversation

Use of NULL variable in scripts/mod/modpost.c

PATCH New Eric Sesterhenn 1 participant 1 message Apr 10, 2006 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use of NULL variable in scripts/mod/modpost.c

hi,

before is NULL in this case, concluding from the surrounding code it seems that after is the right one to use.

scripts/mod/modpost.c renamed from scripts/mod/modpost.c.orig +1 -1
@@ -658,7 +658,7 @@ static void warn_sec_mismatch(const char
 		warn("%s - Section mismatch: reference to %s:%s from %s "
 		     "before '%s' (at offset -0x%llx)\n",
 		     modname, secname, refsymname, fromsec,
-		     elf->strtab + before->st_name,
+		     elf->strtab + after->st_name,
 		     (long long)r.r_offset);
 	} else {
 		warn("%s - Section mismatch: reference to %s:%s from %s "