# HG changeset patch # User Matti Hamalainen # Date 1583785579 -7200 # Node ID 87e97ea5afd1049fa9b203909bbe54142cc8a5c5 # Parent 9bbacd72df3d5346154d3029823b7ffe49a7b7d8 Add some error checking. diff -r 9bbacd72df3d -r 87e97ea5afd1 th_ioctx.c --- a/th_ioctx.c Mon Mar 09 19:13:52 2020 +0200 +++ b/th_ioctx.c Mon Mar 09 22:26:19 2020 +0200 @@ -99,7 +99,8 @@ thfclose(ctx); - th_pstr_cpy(&ctx->mode, mode); + if ((ctx->status = th_pstr_cpy(&ctx->mode, mode)) != THERR_OK) + return ctx->status; return (ctx->status = thfopen(ctx)); }