]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
memory plugin: Update return value consistently. 4224/head
authorFlorian Forster <octo@collectd.org>
Mon, 15 Jan 2024 13:34:30 +0000 (14:34 +0100)
committerFlorian Forster <octo@collectd.org>
Mon, 15 Jan 2024 14:21:58 +0000 (15:21 +0100)
Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
src/memory.c

index f4e79562b726dd38640466bc0753ee2e55bb804e..1135da9f5f63022f7462c8c77f4f5bee8d3c0e99 100644 (file)
@@ -250,10 +250,10 @@ static int memory_dispatch(gauge_t values[STATE_MAX]) {
   if (status != 0) {
     ERROR("memory plugin: plugin_dispatch_metric_family failed: %s",
           STRERROR(status));
-    ret = ret ? ret : status;
   }
-  metric_family_metric_reset(&fam_util);
+  ret = ret ? ret : status;
 
+  metric_family_metric_reset(&fam_util);
   return ret;
 }