summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2007-05-13 11:46:16 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2007-05-13 11:46:16 +0200
commit9bfa1101ac5dbb8d2de1d0431d7e7b281428168f (patch)
tree977cefd982e648852884d5c61d77c23b1ca60416 /src
parent24ac7974ef77d7832a8b3ddd300083c41a03cb79 (diff)
Revert "Don't reinvent the wheel and just use strdup()."
Diffstat (limited to 'src')
-rw-r--r--src/sm_manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sm_manager.c b/src/sm_manager.c
index f2b4cd1..c75764f 100644
--- a/src/sm_manager.c
+++ b/src/sm_manager.c
@@ -76,7 +76,10 @@ _SmsProtocolSetupProc (IceConn iceConn,
if ((smsConn = (SmsConn) malloc (sizeof (struct _SmsConn))) == NULL)
{
- *failureReasonRet = strdup ("Memory allocation failed");
+ char *str = "Memory allocation failed";
+
+ if ((*failureReasonRet = (char *) malloc (strlen (str) + 1)) != NULL)
+ strcpy (*failureReasonRet, str);
return (0);
}