diff --git a/src/common/lock.c b/src/common/lock.c index a743c002a..a8677eb2f 100644 --- a/src/common/lock.c +++ b/src/common/lock.c @@ -175,7 +175,11 @@ lockAcquire(const String *lockPath, const String *stanza, LockType lockType, Tim { MEM_CONTEXT_BEGIN(memContextTop()) { - lockMemContext = memContextNew("Lock"); + MEM_CONTEXT_NEW_BEGIN("Lock") + { + lockMemContext = MEM_CONTEXT_NEW(); + } + MEM_CONTEXT_NEW_END(); } MEM_CONTEXT_END(); } diff --git a/src/protocol/helper.c b/src/protocol/helper.c index 5f144a61c..057b8be99 100644 --- a/src/protocol/helper.c +++ b/src/protocol/helper.c @@ -55,7 +55,11 @@ protocolHelperInit(void) // Create a mem context to store protocol objects MEM_CONTEXT_BEGIN(memContextTop()) { - protocolHelper.memContext = memContextNew("ProtocolHelper"); + MEM_CONTEXT_NEW_BEGIN("ProtocolHelper") + { + protocolHelper.memContext = MEM_CONTEXT_NEW(); + } + MEM_CONTEXT_NEW_END(); } MEM_CONTEXT_END(); } diff --git a/src/storage/helper.c b/src/storage/helper.c index 0ef2bc6b5..508413334 100644 --- a/src/storage/helper.c +++ b/src/storage/helper.c @@ -62,7 +62,11 @@ storageHelperInit(void) { MEM_CONTEXT_BEGIN(memContextTop()) { - storageHelper.memContext = memContextNew("storageHelper"); + MEM_CONTEXT_NEW_BEGIN("StorageHelper") + { + storageHelper.memContext = MEM_CONTEXT_NEW(); + } + MEM_CONTEXT_NEW_END(); } MEM_CONTEXT_END(); } diff --git a/test/src/common/harnessLog.c b/test/src/common/harnessLog.c index 1603191e1..240edf5ae 100644 --- a/test/src/common/harnessLog.c +++ b/test/src/common/harnessLog.c @@ -188,7 +188,11 @@ hrnLogReplaceAdd(const char *expression, const char *expressionSub, const char * { MEM_CONTEXT_BEGIN(memContextTop()) { - harnessLog.memContext = memContextNew("harnessLog"); + MEM_CONTEXT_NEW_BEGIN("HarnessLog") + { + harnessLog.memContext = MEM_CONTEXT_NEW(); + } + MEM_CONTEXT_NEW_END(); } MEM_CONTEXT_END(); }