summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ef.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_ef.c')
-rw-r--r--sys/net/if_ef.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_ef.c b/sys/net/if_ef.c
index 2c2828c..04262c6 100644
--- a/sys/net/if_ef.c
+++ b/sys/net/if_ef.c
@@ -473,8 +473,10 @@ ef_clone(struct ef_link *efl, int ft)
efp->ef_pifp = ifp;
efp->ef_frametype = ft;
eifp = efp->ef_ifp = if_alloc(IFT_ETHER);
- if (ifp == NULL)
+ if (eifp == NULL) {
+ free(efp, M_IFADDR);
return (ENOSPC);
+ }
snprintf(eifp->if_xname, IFNAMSIZ,
"%sf%d", ifp->if_xname, efp->ef_frametype);
eifp->if_dname = "ef";
OpenPOWER on IntegriCloud