aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandra Yates <alexandra.yates@linux.intel.com>2015-02-25 17:40:19 -0800
committerAlexandra Yates <alexandra.yates@linux.intel.com>2015-02-25 17:40:19 -0800
commitd356f4443f1c19ae339aa3ee898a4aed047dc2b6 (patch)
treef6a1e1ab185b349285eb5922d47516b746a87842
parent762ac23a9aebe77876207b94fa44ad055f0ad11e (diff)
parent6fd9ecebd3bc277bd91ce057f85f8e54b09bb0a9 (diff)
downloadpowertop-2.0-d356f4443f1c19ae339aa3ee898a4aed047dc2b6.tar.gz
Update internal repo with external mainline
This adds a couple bug fixes when running auto_tune
-rw-r--r--src/devices/devfreq.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp
index d2e56e3..f652a57 100644
--- a/src/devices/devfreq.cpp
+++ b/src/devices/devfreq.cpp
@@ -247,6 +247,7 @@ void create_all_devfreq_devices(void)
fprintf(stderr, "Devfreq not enabled\n");
is_enabled = false;
closedir(dir);
+ dir = NULL;
return;
}
@@ -327,6 +328,8 @@ void clear_all_devfreq()
}
all_devfreq.clear();
/* close /sys/class/devfreq */
- if (dir != NULL)
+ if (dir != NULL) {
closedir(dir);
+ dir = NULL;
+ }
}