projects
/
platform
/
core
/
connectivity
/
smartcard-service.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the Prevent problems
[platform/core/connectivity/smartcard-service.git]
/
server
/
ServerGDBus.cpp
diff --git
a/server/ServerGDBus.cpp
b/server/ServerGDBus.cpp
index
7409a19
..
1f60e1e
100644
(file)
--- a/
server/ServerGDBus.cpp
+++ b/
server/ServerGDBus.cpp
@@
-133,6
+133,11
@@
namespace smartcard_service_api
const gchar *name, const gchar *old_owner,
const gchar *new_owner, void *user_data)
{
const gchar *name, const gchar *old_owner,
const gchar *new_owner, void *user_data)
{
+ if (name == NULL || old_owner == NULL || new_owner == NULL) {
+ _ERR("invalid parameter");
+ return;
+ }
+
if (strlen(new_owner) == 0) {
ClientInstance *client;
if (strlen(new_owner) == 0) {
ClientInstance *client;
@@
-363,9
+368,12
@@
namespace smartcard_service_api
resource.createClient(name, pid);
instance = resource.getClient(name);
resource.createClient(name, pid);
instance = resource.getClient(name);
-
- /* generate certification hashes */
- instance->generateCertificationHashes();
+ if (instance != NULL) {
+ /* generate certification hashes */
+ instance->generateCertificationHashes();
+ } else {
+ _ERR("createClient failed");
+ }
}
if (instance != NULL) {
}
if (instance != NULL) {