mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
gefs: fix use after free in putconn()
This commit is contained in:
parent
15341e1116
commit
0ab0a036ed
1 changed files with 4 additions and 2 deletions
|
@ -2291,7 +2291,7 @@ putconn(Conn *c)
|
|||
{
|
||||
Conn **pp;
|
||||
Amsg *a;
|
||||
Fid *f;
|
||||
Fid *f, *nf;
|
||||
int i;
|
||||
|
||||
if(adec(&c->ref) != 0)
|
||||
|
@ -2314,7 +2314,9 @@ putconn(Conn *c)
|
|||
|
||||
for(i = 0; i < Nfidtab; i++){
|
||||
lock(&c->fidtablk[i]);
|
||||
for(f = c->fidtab[i]; f != nil; f = f->next){
|
||||
for(f = c->fidtab[i]; f != nil; f = nf){
|
||||
nf = f->next;
|
||||
ainc(&f->ref);
|
||||
lock(f);
|
||||
a = nil;
|
||||
clunkfid(c, f, &a);
|
||||
|
|
Loading…
Reference in a new issue