~ubuntu-branches/ubuntu/utopic/thermald/utopic

« back to all changes in this revision

Viewing changes to debian/patches/0032-coverity-scan-fix-leaking-dir.patch

  • Committer: Package Import Robot
  • Author(s): Colin King
  • Date: 2014-05-19 12:41:22 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140519124122-zan11arvjxtbqcq5
Tags: 1.2-1
* Adjust for coretemp path change
* Deny non root users to send system bus dbus messages
* Remove compile warning
* Remove rpmlint warning for manual page
* Remove old patches that are now included into version 1.2
* Sync up with version 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From 6a047831103bc5404b779f668cfa984738a718fa Mon Sep 17 00:00:00 2001
2
 
From: Colin Ian King <colin.king@canonical.com>
3
 
Date: Wed, 12 Mar 2014 09:50:08 +0000
4
 
Subject: [PATCH 32/33] coverity scan: fix leaking dir
5
 
 
6
 
Close dir before returning on error exit path, fixes leak detected
7
 
by coverity scan.
8
 
 
9
 
Signed-off-by: Colin Ian King <colin.king@canonical.com>
10
 
---
11
 
 src/thd_engine_default.cpp | 1 +
12
 
 1 file changed, 1 insertion(+)
13
 
 
14
 
diff --git a/src/thd_engine_default.cpp b/src/thd_engine_default.cpp
15
 
index f1158ef..46badd0 100644
16
 
--- a/src/thd_engine_default.cpp
17
 
+++ b/src/thd_engine_default.cpp
18
 
@@ -117,6 +117,7 @@ int cthd_engine_default::read_thermal_sensors() {
19
 
                                                                        temp_input_str.str(), SENSOR_TYPE_RAW);
20
 
                                                        if (sensor->sensor_update() != THD_SUCCESS) {
21
 
                                                                delete sensor;
22
 
+                                                               closedir(dir);
23
 
                                                                return THD_ERROR;
24
 
                                                        }
25
 
                                                        sensors.push_back(sensor);
26
 
1.9.0
27