From 4fd1495be6e0758fb993aee6446eb8c68709ae4c Mon Sep 17 00:00:00 2001 From: Dong Anyuan <donganyuan@cn.fujitsu.com> Date: Thu, 20 Jun 2019 14:04:40 +0900 Subject: [PATCH] Fix Coverity Scan CID 339978 (Variable msg going out of scope leaks the storage it points to..) --- targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c index 621e970524..8c4263c7ed 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c @@ -591,5 +591,6 @@ int eth_get_dev_conf_raw_IF4p5(openair0_device *device) { //device->openair0_cfg=(openair0_config_t *)(msg + MAC_HEADER_SIZE_BYTES); printf("[%s] binding mod to hardware address %x:%x:%x:%x:%x:%x hardware address %x:%x:%x:%x:%x:%x\n",((device->host_type == RAU_HOST) ? "RAU": "RRU"),eth->ehd.ether_shost[0],eth->ehd.ether_shost[1],eth->ehd.ether_shost[2],eth->ehd.ether_shost[3],eth->ehd.ether_shost[4],eth->ehd.ether_shost[5],eth->ehd.ether_dhost[0],eth->ehd.ether_dhost[1],eth->ehd.ether_dhost[2],eth->ehd.ether_dhost[3],eth->ehd.ether_dhost[4],eth->ehd.ether_dhost[5]); + free(msg); return 0; } -- GitLab