From 85d5beddcca37dbb9837415aab155ad2ec018426 Mon Sep 17 00:00:00 2001 From: Narate Taerat Date: Thu, 2 Nov 2023 19:11:29 +0000 Subject: [PATCH] Fix possible unintentional `flush()` call in decomposition If the `strgp` uses decomposition, it does not `open()` the store and hence does not have `store_handle` to `flush()`. The strgp with decomposition should not call `flush()` store interface. --- ldms/src/ldmsd/ldmsd_strgp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ldms/src/ldmsd/ldmsd_strgp.c b/ldms/src/ldmsd/ldmsd_strgp.c index 1c7d958d7..e28672df3 100644 --- a/ldms/src/ldmsd/ldmsd_strgp.c +++ b/ldms/src/ldmsd/ldmsd_strgp.c @@ -208,7 +208,7 @@ static void strgp_update_fn(ldmsd_strgp_t strgp, ldmsd_prdcr_set_t prd_set) return; } strgp_decompose(strgp, prd_set); - goto out; + return; /* store() interface routine */ store_routine: @@ -218,7 +218,6 @@ static void strgp_update_fn(ldmsd_strgp_t strgp, ldmsd_prdcr_set_t prd_set) } strgp->store->store(strgp->store_handle, prd_set->set, strgp->metric_arry, strgp->metric_count); - out: if (strgp->flush_interval.tv_sec || strgp->flush_interval.tv_nsec) { struct timespec expiry; struct timespec now;