summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index 5288c8b4..e335d423 100644
--- a/parse.c
+++ b/parse.c
@@ -37,6 +37,7 @@
#include "rsyslog.h"
#include "net.h" /* struct NetAddr */
#include "parse.h"
+#include "debug.h"
/* ################################################################# *
* private members *
@@ -429,7 +430,7 @@ rsRetVal parsAddrWithBits(rsParsObj *pThis, struct NetAddr **pIP, int *pBits)
switch(getaddrinfo ((char*)pszIP+1, NULL, &hints, &res)) {
case 0:
- (*pIP)->addr.NetAddr = malloc (res->ai_addrlen);
+ (*pIP)->addr.NetAddr = MALLOC (res->ai_addrlen);
memcpy ((*pIP)->addr.NetAddr, res->ai_addr, res->ai_addrlen);
freeaddrinfo (res);
break;
@@ -468,7 +469,7 @@ rsRetVal parsAddrWithBits(rsParsObj *pThis, struct NetAddr **pIP, int *pBits)
switch(getaddrinfo ((char*)pszIP, NULL, &hints, &res)) {
case 0:
- (*pIP)->addr.NetAddr = malloc (res->ai_addrlen);
+ (*pIP)->addr.NetAddr = MALLOC (res->ai_addrlen);
memcpy ((*pIP)->addr.NetAddr, res->ai_addr, res->ai_addrlen);
freeaddrinfo (res);
break;