From 08a353bdccc473fabaedd9793a01c9063cf8e47c Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Tue, 23 Apr 2019 12:00:47 +0530 Subject: [PATCH] lookup: Fix memleak in symtab_read() Fix memory leak in symtab_read(), by removing the duplicate strdup() of obj_syms.name. Signed-off-by: Kamalesh Babulal --- kpatch-build/lookup.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kpatch-build/lookup.c b/kpatch-build/lookup.c index b0d78b9..2f18b29 100644 --- a/kpatch-build/lookup.c +++ b/kpatch-build/lookup.c @@ -248,7 +248,6 @@ static void symtab_read(struct lookup_table *table, char *path) table->obj_syms[i].value = value; table->obj_syms[i].size = size; - table->obj_syms[i].name = strdup(name); if (!strcmp(bind, "LOCAL")) { table->obj_syms[i].bind = STB_LOCAL;