some fixes
This commit is contained in:
parent
f11fb85d8e
commit
9c671b8527
3 changed files with 16 additions and 16 deletions
|
|
@ -28,7 +28,7 @@ Sj4Lib* sj4_open(int charset, const char* dic) {
|
|||
if((ctx = calloc(1, sizeof(*ctx))) == NULL) return NULL;
|
||||
|
||||
if((ctx->ctx = alloccontext(dic)) == NULL) {
|
||||
free(ctx);
|
||||
free((char*)ctx);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -96,5 +96,5 @@ int sj4_prevkan(Sj4Lib* ctx) {
|
|||
|
||||
void sj4_close(Sj4Lib* ctx) {
|
||||
free_context(ctx->ctx);
|
||||
free(ctx);
|
||||
free((char*)ctx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue