diff options
author | midipix <writeonce@midipix.org> | 2024-02-11 04:01:08 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-11 04:01:08 +0000 |
commit | 4964fd6881d1fa97309eef90fbb646fc95ef683c (patch) | |
tree | 8ce821cfe9da8d2a92f25493f5d34b8137e7eff6 | |
parent | aed569cdba5e973a048607b0ca74042c240d4db8 (diff) | |
download | slibtool-4964fd6881d1fa97309eef90fbb646fc95ef683c.tar.bz2 slibtool-4964fd6881d1fa97309eef90fbb646fc95ef683c.tar.xz |
slbt_get_lconf_flags(): update internal context member for a later free().
-rw-r--r-- | src/internal/slibtool_lconf_impl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/internal/slibtool_lconf_impl.c b/src/internal/slibtool_lconf_impl.c index 5106d39..b1bde60 100644 --- a/src/internal/slibtool_lconf_impl.c +++ b/src/internal/slibtool_lconf_impl.c @@ -786,8 +786,10 @@ int slbt_get_lconf_flags( return SLBT_CUSTOM_ERROR( dctx,SLBT_ERR_LCONF_PARSE); - if (val[0] && !(ctx->cctx.host.ar = strdup(val))) + if (val[0] && !(ctx->host.ar = strdup(val))) return SLBT_SYSTEM_ERROR(dctx,0); + + ctx->cctx.host.ar = ctx->host.ar; } @@ -797,8 +799,10 @@ int slbt_get_lconf_flags( return SLBT_CUSTOM_ERROR( dctx,SLBT_ERR_LCONF_PARSE); - if (val[0] && !(ctx->cctx.host.ranlib = strdup(val))) + if (val[0] && !(ctx->host.ranlib = strdup(val))) return SLBT_SYSTEM_ERROR(dctx,0); + + ctx->cctx.host.ranlib = ctx->host.ranlib; } |