mirror of https://github.com/F-Stack/f-stack.git
F-stack:fix bug, if ff_veth_softc malloc faild, memory should no be read.
This commit is contained in:
parent
c46b4de422
commit
98f1f12dc7
|
@ -372,7 +372,7 @@ ff_veth_attach(struct ff_port_cfg *cfg)
|
|||
|
||||
sc = malloc(sizeof(struct ff_veth_softc), M_DEVBUF, M_WAITOK);
|
||||
if (NULL == sc) {
|
||||
printf("%s: ff_veth_softc allocation failed\n", sc->host_ifname);
|
||||
printf("ff_veth_softc allocation failed\n");
|
||||
goto fail;
|
||||
}
|
||||
memset(sc, 0, sizeof(struct ff_veth_softc));
|
||||
|
|
Loading…
Reference in New Issue