1
0
mirror of https://github.com/golang/go synced 2024-11-18 08:14:41 -07:00

dangling pointer bug (thanks valgrind)

R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=29881
CL=29885
This commit is contained in:
Russ Cox 2009-06-04 13:33:29 -07:00
parent 3a0df4c451
commit f0e6a3caac

View File

@ -59,7 +59,7 @@ ilookup(char *name)
if(x->name[0] == name[0] && strcmp(x->name, name) == 0)
return x;
x = mal(sizeof *x);
x->name = name;
x->name = strdup(name);
x->hash = ihash[h];
ihash[h] = x;
nimport++;