Skip to content

Commit cbcf14a

Browse files
andy-shevmichal42
authored andcommitted
scripts/mod/modpost.c: fix commentary accordingly to last changes
The last commits 37ed19d 5003bab have introduced new behaviour of sec2annotation() method. However, the commentary inside the method was left as before. Let's fix it accordingly. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Andrew Morton <akpm@linux-foundation.org> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
1 parent 55c640c commit cbcf14a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎scripts/mod/modpost.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,9 @@ static Elf_Sym *find_elf_symbol2(struct elf_info *elf, Elf_Addr addr,
11931193
* .cpuinit.data => __cpudata
11941194
* .memexitconst => __memconst
11951195
* etc.
1196+
*
1197+
* The memory of returned value has been allocated on a heap. The user of this
1198+
* method should free it after usage.
11961199
*/
11971200
static char *sec2annotation(const char *s)
11981201
{
@@ -1215,7 +1218,7 @@ static char *sec2annotation(const char *s)
12151218
strcat(p, "data ");
12161219
else
12171220
strcat(p, " ");
1218-
return r; /* we leak her but we do not care */
1221+
return r;
12191222
} else {
12201223
return "";
12211224
}

0 commit comments

Comments
 (0)