- add missing NOFAIL to strtbl_add() in load_dep_syms()
- export strtbl_free()
- free string tables with strtbl_free()
- documentation fix

Signed-off-by: Andreas Robinson <[email protected]>
---
 depmod.c      |    2 +-
 elfops_core.c |    5 +++--
 util.c        |    2 +-
 util.h        |    1 +
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/depmod.c b/depmod.c
index e636659..a8c3a47 100644
--- a/depmod.c
+++ b/depmod.c
@@ -693,7 +693,7 @@ static struct module *parse_modules(struct module *list)
                if (syms) {
                        for (j = 0; j < syms->cnt; j++)
                                add_symbol(syms->str[j], i);
-                       free(syms);
+                       strtbl_free(syms);
                }
                file->ops->fetch_tables(file, &i->tables);
        }
diff --git a/elfops_core.c b/elfops_core.c
index 39fd4c3..1e8083b 100644
--- a/elfops_core.c
+++ b/elfops_core.c
@@ -190,8 +190,9 @@ static struct string_table *PERBIT(load_dep_syms)(const 
char *pathname,
 
                        weak = (ELFPERBIT(ST_BIND)(END(syms[i].st_info, conv))
                                == STB_WEAK);
-                       names = strtbl_add(name, names);
-                       *types = strtbl_add(weak ? weak_sym : undef_sym, 
*types);
+                       names = NOFAIL(strtbl_add(name, names));
+                       *types = NOFAIL(strtbl_add(weak ? weak_sym : undef_sym,
+                               *types));
                }
        }
        return names;
diff --git a/util.c b/util.c
index 3802a02..4df11e0 100644
--- a/util.c
+++ b/util.c
@@ -152,7 +152,7 @@ struct string_table *strtbl_add(const char *str, struct 
string_table *tbl)
 }
 
 /*
- * strtbl_destroy - string table destructor
+ * strtbl_free - string table destructor
  */
 void strtbl_free(struct string_table *tbl)
 {
diff --git a/util.h b/util.h
index d6112b0..d512072 100644
--- a/util.h
+++ b/util.h
@@ -17,6 +17,7 @@ char *underscores(char *string);
 char *my_basename(const char *path);
 
 struct string_table *strtbl_add(const char *str, struct string_table *tbl);
+void strtbl_free(struct string_table *tbl);
 
 const char *next_string(const char *string, unsigned long *secsize);
 
-- 
1.6.0.4


--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to