git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
common/cpt: fix possible null dereference
[dpdk.git]
/
drivers
/
common
/
cpt
/
cpt_ucode.h
diff --git
a/drivers/common/cpt/cpt_ucode.h
b/drivers/common/cpt/cpt_ucode.h
index
0dac12e
..
d5a0135
100644
(file)
--- a/
drivers/common/cpt/cpt_ucode.h
+++ b/
drivers/common/cpt/cpt_ucode.h
@@
-310,7
+310,8
@@
cpt_fc_ciph_set_key(void *ctx, cipher_type_t type, const uint8_t *key,
memcpy(fctx->enc.encr_key, key, key_len);
fc_success:
- *ctrl_flags = rte_cpu_to_be_64(*ctrl_flags);
+ if (ctrl_flags != NULL)
+ *ctrl_flags = rte_cpu_to_be_64(*ctrl_flags);
success:
cpt_ctx->enc_cipher = type;