fix memory leak when error during opening of routing socket

PR:		kern/29336
Submitted by:	Richard Andrades <richard@xebeo.com>
MFC after:	1 month
This commit is contained in:
Jonathan Chen 2001-08-02 19:56:29 +00:00
parent f950650b78
commit 7ba271ae0b

View file

@ -127,6 +127,7 @@ rts_attach(struct socket *so, int proto, struct proc *p)
rp = sotorawcb(so);
if (error) {
splx(s);
so->so_pcb = NULL;
free(rp, M_PCB);
return error;
}