Skip to content
Snippets Groups Projects
Commit 7a710e0b authored by Loi Anh Tuan's avatar Loi Anh Tuan
Browse files

invoke contructor of struct ks to initialize all the members

parent 11efb96b
No related branches found
No related tags found
No related merge requests found
......@@ -174,6 +174,7 @@ ks_err ks_open(ks_arch arch, ks_mode mode, ks_engine **result)
if (arch < KS_ARCH_MAX) {
ks = (struct ks_struct *)calloc(1, sizeof(*ks));
ks = new(ks) ks_struct;
if (!ks) {
// memory insufficient
return KS_ERR_NOMEM;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment