summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sm_manager.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/sm_manager.c b/src/sm_manager.c
index df9c221..57f53b5 100644
--- a/src/sm_manager.c
+++ b/src/sm_manager.c
@@ -73,10 +73,7 @@ _SmsProtocolSetupProc (IceConn iceConn,
if ((smsConn = (SmsConn) malloc (sizeof (struct _SmsConn))) == NULL)
{
- char *str = "Memory allocation failed";
-
- if ((*failureReasonRet = (char *) malloc (strlen (str) + 1)) != NULL)
- strcpy (*failureReasonRet, str);
+ *failureReasonRet = strdup ("Memory allocation failed");
return (0);
}