Fixed bug in power buffer allocation.

This commit is contained in:
Daniel Beer 2012-10-04 14:39:21 +12:00
parent 56ffd537b6
commit 8a70a931bb
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}