From 8a70a931bb8786fc4c7054c5df2b0b3f1f98499f Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Thu, 4 Oct 2012 14:39:21 +1200 Subject: [PATCH] Fixed bug in power buffer allocation. --- util/powerbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/powerbuf.c b/util/powerbuf.c index ee7113e..2ea323a 100644 --- a/util/powerbuf.c +++ b/util/powerbuf.c @@ -27,7 +27,7 @@ powerbuf_t powerbuf_new(unsigned int max_samples, unsigned int interval_us) if (!pb) return NULL; - if (pb->max_samples <= 0) { + if (max_samples <= 0) { free(pb); return NULL; }