From 4964fd6881d1fa97309eef90fbb646fc95ef683c Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 11 Feb 2024 04:01:08 +0000 Subject: slbt_get_lconf_flags(): update internal context member for a later free(). --- src/internal/slibtool_lconf_impl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/internal') 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; } -- cgit v1.2.3