git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c91b871
)
app/test: fix crash after mbuf allocation failure
author
Tetsuya Mukawa
<mukawa@igel.co.jp>
Fri, 12 Jun 2015 02:54:00 +0000
(11:54 +0900)
committer
Thomas Monjalon
<thomas.monjalon@6wind.com>
Mon, 22 Jun 2015 21:05:51 +0000
(23:05 +0200)
The patch fixes potential null pointer accesses in test_mbuf.
If 'm[i]' is null, stop accessing it.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
app/test/test_mbuf.c
patch
|
blob
|
history
diff --git
a/app/test/test_mbuf.c
b/app/test/test_mbuf.c
index
5e8a377
..
5d13b37
100644
(file)
--- a/
app/test/test_mbuf.c
+++ b/
app/test/test_mbuf.c
@@
-594,6
+594,7
@@
test_pktmbuf_pool_ptr(void)
if (m[i] == NULL) {
printf("rte_pktmbuf_alloc() failed (%u)\n", i);
ret = -1;
+ break;
}
m[i]->data_off += 64;
}
@@
-613,6
+614,7
@@
test_pktmbuf_pool_ptr(void)
if (m[i] == NULL) {
printf("rte_pktmbuf_alloc() failed (%u)\n", i);
ret = -1;
+ break;
}
if (m[i]->data_off != RTE_PKTMBUF_HEADROOM) {
printf("invalid data_off\n");