Skip to content

Commit

Permalink
fix free of wild pointer if user omits an arg
Browse files Browse the repository at this point in the history
strgp_decomp_init 'goto einval' jumps free an
uninitialized pointer (decomp) if the user supplies the wrong arguments.
  • Loading branch information
baallan committed Feb 27, 2024
1 parent 9dd76c4 commit 18539b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ldms/src/ldmsd/ldmsd_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 18539b4

Please sign in to comment.