aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2013-07-03 16:12:32 +0200
committerPaul Kocialkowski <contact@paulk.fr>2013-07-03 16:12:32 +0200
commitb3a8843cea6e3d3959dfbdf8fbe01e3c1619b877 (patch)
tree2db2a1824cd147806349fd465cb169e52caceff0 /samsung-ipc
parent250ba51ce4e311c4e5981222e18ef26059dc8563 (diff)
downloadhardware_replicant_libsamsung-ipc-b3a8843cea6e3d3959dfbdf8fbe01e3c1619b877.tar.gz
hardware_replicant_libsamsung-ipc-b3a8843cea6e3d3959dfbdf8fbe01e3c1619b877.tar.bz2
hardware_replicant_libsamsung-ipc-b3a8843cea6e3d3959dfbdf8fbe01e3c1619b877.zip
ipc.c: Check heandlers data create/destroy pointers
Change-Id: I34cc6af9596500d4daf035250b4c25639e813b51 Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'samsung-ipc')
-rw-r--r--samsung-ipc/ipc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c
index 5e9b3d3..49027c3 100644
--- a/samsung-ipc/ipc.c
+++ b/samsung-ipc/ipc.c
@@ -384,7 +384,8 @@ int ipc_client_gprs_deactivate(struct ipc_client *client, int cid)
int ipc_client_data_create(struct ipc_client *client)
{
- if (client == NULL || client->handlers == NULL)
+ if (client == NULL || client->handlers == NULL ||
+ client->handlers->data_create == NULL)
return -1;
return client->handlers->data_create(&client->handlers->transport_data,
@@ -393,7 +394,8 @@ int ipc_client_data_create(struct ipc_client *client)
int ipc_client_data_destroy(struct ipc_client *client)
{
- if (client == NULL || client->handlers == NULL)
+ if (client == NULL || client->handlers == NULL ||
+ client->handlers->data_destroy == NULL)
return -1;
return client->handlers->data_destroy(client->handlers->transport_data,