X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=scripts%2Fmod%2Fmodpost.c;h=33122ca04e7cd99cfb1be6bb4a5c62fd66efe51b;hb=66fc5dff5e4f82c92723202a5de9bdec16a9331f;hp=1ec7158b6c1f67e7264260c5995842d93854ee42;hpb=763008c4357b73c8d18396dfd8d79dc58fa3f99d;p=karo-tx-linux.git 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(""); }