X-Git-Url: http://git.cascardo.info/?p=cascardo%2Flinux.git;a=blobdiff_plain;f=scripts%2Fmod%2Fmodpost.c;h=33122ca04e7cd99cfb1be6bb4a5c62fd66efe51b;hp=1ec7158b6c1f67e7264260c5995842d93854ee42;hb=c9e2a72ff1acfdffdecb338b3d997f90c507e665;hpb=f46a6804135795f77d096ab0128f27531c7d051c diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 1ec7158b6c1f..33122ca04e7c 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1208,6 +1208,9 @@ static Elf_Sym *find_elf_symbol2(struct elf_info *elf, Elf_Addr addr, * .cpuinit.data => __cpudata * .memexitconst => __memconst * etc. + * + * The memory of returned value has been allocated on a heap. The user of this + * method should free it after usage. */ static char *sec2annotation(const char *s) { @@ -1230,7 +1233,7 @@ static char *sec2annotation(const char *s) strcat(p, "data "); else strcat(p, " "); - return r; /* we leak her but we do not care */ + return r; } else { return strdup(""); }