summaryrefslogtreecommitdiffstats
path: root/msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'msg.c')
-rw-r--r--msg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/msg.c b/msg.c
index 11b87b92..a5fc2bc7 100644
--- a/msg.c
+++ b/msg.c
@@ -328,8 +328,8 @@ msg_t* MsgDup(msg_t* pOld)
assert(pOld != NULL);
- if((pNew = (msg_t*) calloc(1, sizeof(msg_t))) == NULL) {
- glblHadMemShortage = 1;
+ BEGINfunc
+ if(msgConstruct(&pNew) != RS_RET_OK) {
return NULL;
}
@@ -364,6 +364,7 @@ msg_t* MsgDup(msg_t* pOld)
* if they are needed once again. So we let them re-create if needed.
*/
+ ENDfunc
return pNew;
}
#undef tmpCOPYSZ