From 18539b44e5fbeaa388b4f305697b937d6343c046 Mon Sep 17 00:00:00 2001 From: Ben Allan Date: Mon, 26 Feb 2024 18:16:15 -0700 Subject: [PATCH] fix free of wild pointer if user omits an arg strgp_decomp_init 'goto einval' jumps free an uninitialized pointer (decomp) if the user supplies the wrong arguments. --- ldms/src/ldmsd/ldmsd_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldms/src/ldmsd/ldmsd_request.c b/ldms/src/ldmsd/ldmsd_request.c index e18416693..4b2152214 100644 --- a/ldms/src/ldmsd/ldmsd_request.c +++ b/ldms/src/ldmsd/ldmsd_request.c @@ -2425,7 +2425,7 @@ int strgp_decomp_init(ldmsd_strgp_t strgp, ldmsd_req_ctxt_t req); static int strgp_add_handler(ldmsd_req_ctxt_t reqc) { char *attr_name, *name, *plugin, *container, *schema, *interval, *regex; - char *decomp; + char *decomp = NULL; name = plugin = container = schema = NULL; size_t cnt = 0; uid_t uid;