fix use after free
This commit is contained in:
@@ -839,7 +839,6 @@ p11_init(hx509_context context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
p->dl_handle = dlopen(list, RTLD_NOW);
|
p->dl_handle = dlopen(list, RTLD_NOW);
|
||||||
free(list);
|
|
||||||
if (p->dl_handle == NULL) {
|
if (p->dl_handle == NULL) {
|
||||||
ret = HX509_PKCS11_LOAD;
|
ret = HX509_PKCS11_LOAD;
|
||||||
hx509_set_error_string(context, 0, ret,
|
hx509_set_error_string(context, 0, ret,
|
||||||
@@ -935,10 +934,14 @@ p11_init(hx509_context context,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(list);
|
||||||
|
|
||||||
*data = p;
|
*data = p;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
out:
|
out:
|
||||||
|
if (list)
|
||||||
|
free(list);
|
||||||
p11_release_module(p);
|
p11_release_module(p);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user