F-stack:fix bug, if ff_veth_softc malloc faild, memory should no be read.

This commit is contained in:
yanya 2018-06-08 17:42:46 +08:00 committed by mscbg
parent c46b4de422
commit 98f1f12dc7
1 changed files with 1 additions and 1 deletions

View File

@ -372,7 +372,7 @@ ff_veth_attach(struct ff_port_cfg *cfg)
sc = malloc(sizeof(struct ff_veth_softc), M_DEVBUF, M_WAITOK); sc = malloc(sizeof(struct ff_veth_softc), M_DEVBUF, M_WAITOK);
if (NULL == sc) { if (NULL == sc) {
printf("%s: ff_veth_softc allocation failed\n", sc->host_ifname); printf("ff_veth_softc allocation failed\n");
goto fail; goto fail;
} }
memset(sc, 0, sizeof(struct ff_veth_softc)); memset(sc, 0, sizeof(struct ff_veth_softc));