diff options
author | midipix <writeonce@midipix.org> | 2020-12-20 23:09:31 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2020-12-20 23:09:31 +0000 |
commit | 6beda1bcee4396ceced99b8a8c5627940f507ace (patch) | |
tree | 9f4d796da9415af666aa8485b653e21a6cb4d6e2 /src/driver | |
parent | 56f236d413d8aa5e0c875f0926f0c6dd9fb1d7d0 (diff) | |
download | slibtool-6beda1bcee4396ceced99b8a8c5627940f507ace.tar.bz2 slibtool-6beda1bcee4396ceced99b8a8c5627940f507ace.tar.xz |
internals: error tracing: record the not-found path upon ENOENT as needed.
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/slbt_driver_ctx.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index b105c2b..4812076 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -1755,6 +1755,17 @@ int slbt_get_driver_ctx( static void slbt_free_driver_ctx_impl(struct slbt_driver_ctx_alloc * ictx) { + struct slbt_error_info ** perr; + struct slbt_error_info * erri; + + for (perr=ictx->ctx.errinfp; *perr; perr++) { + erri = *perr; + + if (erri->eany && (erri->esyscode == ENOENT)) + free(erri->eany); + } + + if (ictx->ctx.libname) free(ictx->ctx.libname); @@ -1807,11 +1818,11 @@ int slbt_set_alternate_host( slbt_free_host_params(&ictx->ctx.ahost); if (!(ictx->ctx.ahost.host = strdup(host))) - return SLBT_SYSTEM_ERROR(ctx); + return SLBT_SYSTEM_ERROR(ctx,0); if (!(ictx->ctx.ahost.flavor = strdup(flavor))) { slbt_free_host_params(&ictx->ctx.ahost); - return SLBT_SYSTEM_ERROR(ctx); + return SLBT_SYSTEM_ERROR(ctx,0); } ictx->ctx.cctx.ahost.host = ictx->ctx.ahost.host; |