From 98f1f12dc7325edb04a64f682aa99992a58f6615 Mon Sep 17 00:00:00 2001 From: yanya Date: Fri, 8 Jun 2018 17:42:46 +0800 Subject: [PATCH] F-stack:fix bug, if ff_veth_softc malloc faild, memory should no be read. --- lib/ff_veth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ff_veth.c b/lib/ff_veth.c index d1af12a6..0f0b09ef 100644 --- a/lib/ff_veth.c +++ b/lib/ff_veth.c @@ -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));