summaryrefslogtreecommitdiffstats
path: root/plugins/omrelp/omrelp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-16 16:58:15 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-16 16:58:15 +0200
commitc5178a4d21cf8ca3362b8a8394d0e762801550a4 (patch)
tree0916303e0cd18e00397a6eb28a64b32aa5908c4d /plugins/omrelp/omrelp.c
parent65cdfc1777e1c189f28dfe11fa1ab0d08930b458 (diff)
parent11a526bcee95dab6a5bf2cc25a07dc6d65eaa177 (diff)
downloadrsyslog-c5178a4d21cf8ca3362b8a8394d0e762801550a4.tar.gz
rsyslog-c5178a4d21cf8ca3362b8a8394d0e762801550a4.tar.xz
rsyslog-c5178a4d21cf8ca3362b8a8394d0e762801550a4.zip
Merge branch 'master' into beta
3.17.x is the new beta Conflicts: ChangeLog configure.ac
Diffstat (limited to 'plugins/omrelp/omrelp.c')
-rw-r--r--plugins/omrelp/omrelp.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c
index 39d25812..04571682 100644
--- a/plugins/omrelp/omrelp.c
+++ b/plugins/omrelp/omrelp.c
@@ -53,7 +53,7 @@ DEFobjCurrIf(errmsg)
static relpEngine_t *pRelpEngine; /* our relp engine */
typedef struct _instanceData {
- char f_hname[MAXHOSTNAMELEN+1];
+ char *f_hname;
int compressionLevel; /* 0 - no compression, else level for zlib */
char *port;
int bInitialConnect; /* is this the initial connection request of our module? (0-no, 1-yes) */
@@ -98,6 +98,9 @@ CODESTARTfreeInstance
if(pData->pRelpClt != NULL)
relpEngineCltDestruct(pRelpEngine, &pData->pRelpClt);
+ if(pData->f_hname != NULL)
+ free(pData->f_hname);
+
ENDfreeInstance
@@ -284,10 +287,11 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
/* TODO: make this if go away! */
if(*p == ';') {
*p = '\0'; /* trick to obtain hostname (later)! */
- strcpy(pData->f_hname, (char*) q);
+ CHKmalloc(pData->f_hname = strdup((char*) q));
*p = ';';
- } else
- strcpy(pData->f_hname, (char*) q);
+ } else {
+ CHKmalloc(pData->f_hname = strdup((char*) q));
+ }
/* process template */
CHKiRet(cflineParseTemplateName(&p, *ppOMSR, 0, OMSR_NO_RQD_TPL_OPTS, (uchar*) "RSYSLOG_ForwardFormat"));