Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New upstream version 18.11-rc2
[deb_dpdk.git]
/
lib
/
librte_eal
/
common
/
hotplug_mp.c
diff --git
a/lib/librte_eal/common/hotplug_mp.c
b/lib/librte_eal/common/hotplug_mp.c
index
84f59d9
..
7c9fcc4
100644
(file)
--- a/
lib/librte_eal/common/hotplug_mp.c
+++ b/
lib/librte_eal/common/hotplug_mp.c
@@
-243,7
+243,7
@@
static void __handle_primary_request(void *param)
da = calloc(1, sizeof(*da));
if (da == NULL) {
ret = -ENOMEM;
da = calloc(1, sizeof(*da));
if (da == NULL) {
ret = -ENOMEM;
-
goto quit
;
+
break
;
}
ret = rte_devargs_parse(da, req->devargs);
}
ret = rte_devargs_parse(da, req->devargs);
@@
-266,6
+266,8
@@
static void __handle_primary_request(void *param)
ret = local_dev_remove(dev);
quit:
ret = local_dev_remove(dev);
quit:
+ free(da->args);
+ free(da);
break;
default:
ret = -EINVAL;
break;
default:
ret = -EINVAL;
@@
-355,6
+357,7
@@
int eal_dev_hotplug_request_to_primary(struct eal_dev_mp_req *req)
resp = (struct eal_dev_mp_req *)mp_reply.msgs[0].param;
req->result = resp->result;
resp = (struct eal_dev_mp_req *)mp_reply.msgs[0].param;
req->result = resp->result;
+ free(mp_reply.msgs);
return ret;
}
return ret;
}
@@
-379,6
+382,7
@@
int eal_dev_hotplug_request_to_secondary(struct eal_dev_mp_req *req)
if (mp_reply.nb_sent != mp_reply.nb_received) {
RTE_LOG(ERR, EAL, "not all secondary reply\n");
if (mp_reply.nb_sent != mp_reply.nb_received) {
RTE_LOG(ERR, EAL, "not all secondary reply\n");
+ free(mp_reply.msgs);
return -1;
}
return -1;
}
@@
-397,6
+401,7
@@
int eal_dev_hotplug_request_to_secondary(struct eal_dev_mp_req *req)
}
}
}
}
+ free(mp_reply.msgs);
return 0;
}
return 0;
}