summaryrefslogtreecommitdiff
path: root/src/gateway
diff options
context:
space:
mode:
authorOnkar Palkar <onkar.palkar@wipro.com>2017-02-02 17:49:34 +0900
committerChristoph Lipka <clipka@jp.adit-jv.com>2017-02-06 11:51:52 +0900
commit859802afd10d159b9e370058bca53c8c12bba2f5 (patch)
treec0d21e00fb567120deac8f3911f8f958716f7e7a /src/gateway
parenta961dba0013ed2119aa719546c63212459753549 (diff)
downloadDLT-daemon-859802afd10d159b9e370058bca53c8c12bba2f5.tar.gz
dlt-client: fix dlt_client_cleanup memory handling
Setter function introduced for seting up string parameters which are free'd in dlt_client_cleanup Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
Diffstat (limited to 'src/gateway')
-rw-r--r--src/gateway/dlt_gateway.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gateway/dlt_gateway.c b/src/gateway/dlt_gateway.c
index 902822a..04237c2 100644
--- a/src/gateway/dlt_gateway.c
+++ b/src/gateway/dlt_gateway.c
@@ -425,8 +425,13 @@ int dlt_gateway_store_connection(DltGateway *gateway,
gateway->connections[i].client.sock,
DLT_DAEMON_RCVBUFSIZESOCK);
/* setup DltClient Structure */
- gateway->connections[i].client.servIP =
- strdup(gateway->connections[i].ip_address);
+ if(dlt_client_set_server_ip(&gateway->connections[i].client,
+ gateway->connections[i].ip_address) == -1)
+ {
+ dlt_log(LOG_ERR,
+ "dlt_client_set_server_ip() failed for gateway connection \n");
+ return -1;
+ }
if (ret != 0)
{