summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/config_profile/src/ini_file.cc3
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/components/config_profile/src/ini_file.cc b/src/components/config_profile/src/ini_file.cc
index 236dd1ae2b..5ec77d183b 100644
--- a/src/components/config_profile/src/ini_file.cc
+++ b/src/components/config_profile/src/ini_file.cc
@@ -186,15 +186,18 @@ char ini_write_value(const char *fname,
fd = mkstemp(temp_fname);
if (-1 == fd) {
+ fclose(rd_fp);
return FALSE;
}
wr_fp = fdopen(fd, "w");
if (NULL == wr_fp) {
unlink(temp_fname);
close(fd);
+ fclose(rd_fp);
return FALSE;
}
} else {
+ fclose(rd_fp);
return FALSE;
}
}
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc b/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
index d6f9f26317..4240c9a3a4 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
@@ -120,6 +120,7 @@ bool BluetoothSocketConnection::Establish(ConnectError** error) {
"Failed to Connect to remote device " << BluetoothDevice::GetUniqueDeviceId(
remoteSocketAddress.rc_bdaddr) << " for session " << this);
*error = new ConnectError();
+ close(rfcomm_socket);
LOG4CXX_TRACE(logger_, "exit with FALSE");
return false;
}