summaryrefslogtreecommitdiff
path: root/sys/src/cmd/mk/symtab.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-06-01 18:31:21 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2016-06-01 18:31:21 +0200
commitb878450725de85dc874f42bc9de4ce1d5087f900 (patch)
treeadb8c6c416e0ccb930989ab4aa8e8ffb117acc04 /sys/src/cmd/mk/symtab.c
parent68571320fa2ba4f993199370d60dc4dbd114bea8 (diff)
mk: remove buggy and unneeded syminit() function (thanks qurstuv)
syminit() attemts to reset the symbol table by freeing all the hash table entries, tho the code is buggy having a obviously use after free bug. as syminit() is only called once in main when it does not contain any symbols, the bug never occured. removing the unneccesary code alltogether.
Diffstat (limited to 'sys/src/cmd/mk/symtab.c')
-rw-r--r--sys/src/cmd/mk/symtab.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/sys/src/cmd/mk/symtab.c b/sys/src/cmd/mk/symtab.c
index 57129ae67..dc47f1669 100644
--- a/sys/src/cmd/mk/symtab.c
+++ b/sys/src/cmd/mk/symtab.c
@@ -4,18 +4,6 @@
#define HASHMUL 79L /* this is a good value */
static Symtab *hash[NHASH];
-void
-syminit(void)
-{
- Symtab **s, *ss;
-
- for(s = hash; s < &hash[NHASH]; s++){
- for(ss = *s; ss; ss = ss->next)
- free((char *)ss);
- *s = 0;
- }
-}
-
Symtab *
symlook(char *sym, int space, void *install)
{