summaryrefslogtreecommitdiffstats
path: root/runtime/wtp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-10-22 11:33:38 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-10-22 11:33:38 +0200
commite04e1b50025f5fa9c26abd946190dce8f797d08f (patch)
treeb5348b56bbd4b72ff713c2650cd4661318f8e8b1 /runtime/wtp.c
parent9079f6683057c5aad0a73eb56e33a1f1445f6e65 (diff)
downloadrsyslog-e04e1b50025f5fa9c26abd946190dce8f797d08f.tar.gz
rsyslog-e04e1b50025f5fa9c26abd946190dce8f797d08f.tar.xz
rsyslog-e04e1b50025f5fa9c26abd946190dce8f797d08f.zip
enhanced test environment (including testbench)
support for enhancing probability of memory addressing failure by using non-NULL default value for malloced memory (optional, only if requested by configure option). This helps to track down some otherwise undetected issues within the testbench and is expected to be very useful in the future.
Diffstat (limited to 'runtime/wtp.c')
-rw-r--r--runtime/wtp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/wtp.c b/runtime/wtp.c
index 3e76bb56..08cf5c3d 100644
--- a/runtime/wtp.c
+++ b/runtime/wtp.c
@@ -117,7 +117,7 @@ wtpConstructFinalize(wtp_t *pThis)
/* alloc and construct workers - this can only be done in finalizer as we previously do
* not know the max number of workers
*/
- if((pThis->pWrkr = malloc(sizeof(wti_t*) * pThis->iNumWorkerThreads)) == NULL)
+ if((pThis->pWrkr = MALLOC(sizeof(wti_t*) * pThis->iNumWorkerThreads)) == NULL)
ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
for(i = 0 ; i < pThis->iNumWorkerThreads ; ++i) {
@@ -459,7 +459,7 @@ wtpSetDbgHdr(wtp_t *pThis, uchar *pszMsg, size_t lenMsg)
pThis->pszDbgHdr = NULL;
}
- if((pThis->pszDbgHdr = malloc(sizeof(uchar) * lenMsg + 1)) == NULL)
+ if((pThis->pszDbgHdr = MALLOC(sizeof(uchar) * lenMsg + 1)) == NULL)
ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
memcpy(pThis->pszDbgHdr, pszMsg, lenMsg + 1); /* always think about the \0! */