mirror of
https://github.com/golang/go
synced 2024-11-23 03:30:02 -07:00
cmd/ld: fix 'use after free' error in new obj code
Many thanks to Elias Naur for finding this with Valgrind on Linux. Perhaps this is what is breaking the windows/amd64 builder. R=golang-dev, r CC=golang-dev https://golang.org/cl/7595044
This commit is contained in:
parent
5dc1e0f245
commit
f7ad816c5c
@ -528,7 +528,7 @@ ldhostobj(void (*ld)(Biobuf*, char*, int64, char*), Biobuf *f, char *pkg, int64
|
||||
}
|
||||
h = &hostobj[nhostobj++];
|
||||
h->ld = ld;
|
||||
h->pkg = pkg;
|
||||
h->pkg = estrdup(pkg);
|
||||
h->pn = estrdup(pn);
|
||||
h->file = estrdup(file);
|
||||
h->off = Boffset(f);
|
||||
|
Loading…
Reference in New Issue
Block a user