projects
/
platform
/
core
/
security
/
yaca.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f48732
)
yaca_ctx_free: NULL context handling
93/65593/1
author
Mateusz Kulikowski
<m.kulikowski@samsung.com>
Mon, 11 Apr 2016 09:43:04 +0000
(11:43 +0200)
committer
Mateusz Kulikowski
<m.kulikowski@samsung.com>
Mon, 11 Apr 2016 09:43:04 +0000
(11:43 +0200)
Ignore null contexts.
Change-Id: I7ecac9603519d91d5708f4eed11af0a9f8a4ce17
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
src/crypto.c
patch
|
blob
|
history
diff --git
a/src/crypto.c
b/src/crypto.c
index
b77e9a2
..
af73404
100644
(file)
--- a/
src/crypto.c
+++ b/
src/crypto.c
@@
-94,8
+94,10
@@
API int yaca_ctx_get_param(const yaca_ctx_h ctx, yaca_ex_param_e param,
API void yaca_ctx_free(yaca_ctx_h ctx)
{
- ctx->ctx_destroy(ctx);
- yaca_free(ctx);
+ if (ctx != YACA_CTX_NULL) {
+ ctx->ctx_destroy(ctx);
+ yaca_free(ctx);
+ }
}
API int yaca_get_output_length(const yaca_ctx_h ctx, size_t input_len)