Merge pull request #230 from mscbg/master

F-stack:fix bug, if ff_veth_softc malloc faild, memory should not be read
This commit is contained in:
logwang 2018-06-11 11:10:16 +08:00 committed by GitHub
commit 5f219b2cad
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);
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));