summaryrefslogtreecommitdiff
path: root/src/sm_client.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-19 10:23:24 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-09 17:37:09 -0800
commit46f3ef4460aa2c1c2cba22897694a1cea572d506 (patch)
tree8946f6fc1c623d40783992dfe2ae9383e1bcc707 /src/sm_client.c
parentfb3ef5844d392f70cc6bd9b0d8770ca17bde1428 (diff)
Replace malloc(strlen) + strcpy sets with strdup calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: James Cloos <cloos@jhcloos.com>
Diffstat (limited to 'src/sm_client.c')
-rw-r--r--src/sm_client.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/sm_client.c b/src/sm_client.c
index 70511c1..faf2b9f 100644
--- a/src/sm_client.c
+++ b/src/sm_client.c
@@ -249,10 +249,7 @@ SmcOpenConnection(char *networkIdsList, SmPointer context,
*clientIdRet = reply.client_id;
- smcConn->client_id = (char *) malloc (
- strlen (*clientIdRet) + 1);
-
- strcpy (smcConn->client_id, *clientIdRet);
+ smcConn->client_id = strdup (*clientIdRet);
}
else
{