aboutsummaryrefslogtreecommitdiff
path: root/example/l3fwd/odp_l3fwd_db.c
diff options
context:
space:
mode:
Diffstat (limited to 'example/l3fwd/odp_l3fwd_db.c')
-rw-r--r--example/l3fwd/odp_l3fwd_db.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/example/l3fwd/odp_l3fwd_db.c b/example/l3fwd/odp_l3fwd_db.c
index 082b2c276..0670aa455 100644
--- a/example/l3fwd/odp_l3fwd_db.c
+++ b/example/l3fwd/odp_l3fwd_db.c
@@ -394,7 +394,10 @@ int create_fwd_db_entry(char *input, char **oif, uint8_t **dst_mac)
*oif = entry->oif;
break;
case 2:
- odph_eth_addr_parse(&entry->dst_mac, token);
+ if (odph_eth_addr_parse(&entry->dst_mac, token) < 0) {
+ free(local);
+ return -1;
+ }
*dst_mac = entry->dst_mac.addr;
break;