diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-16 16:58:15 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-16 16:58:15 +0200 |
commit | c5178a4d21cf8ca3362b8a8394d0e762801550a4 (patch) | |
tree | 0916303e0cd18e00397a6eb28a64b32aa5908c4d /plugins/omgssapi/omgssapi.c | |
parent | 65cdfc1777e1c189f28dfe11fa1ab0d08930b458 (diff) | |
parent | 11a526bcee95dab6a5bf2cc25a07dc6d65eaa177 (diff) | |
download | rsyslog-c5178a4d21cf8ca3362b8a8394d0e762801550a4.tar.gz rsyslog-c5178a4d21cf8ca3362b8a8394d0e762801550a4.tar.bz2 rsyslog-c5178a4d21cf8ca3362b8a8394d0e762801550a4.zip |
Merge branch 'master' into beta
3.17.x is the new beta
Conflicts:
ChangeLog
configure.ac
Diffstat (limited to 'plugins/omgssapi/omgssapi.c')
-rw-r--r-- | plugins/omgssapi/omgssapi.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/plugins/omgssapi/omgssapi.c b/plugins/omgssapi/omgssapi.c index 9a7e8ab9..8c6a2006 100644 --- a/plugins/omgssapi/omgssapi.c +++ b/plugins/omgssapi/omgssapi.c @@ -4,7 +4,7 @@ * NOTE: read comments in module-template.h to understand how this file * works! * - * Copyright 2007 Rainer Gerhards and Adiscon GmbH. + * Copyright 2007, 2008 Rainer Gerhards and Adiscon GmbH. * * This file is part of rsyslog. * @@ -79,7 +79,7 @@ DEFobjCurrIf(gssutil) DEFobjCurrIf(tcpclt) typedef struct _instanceData { - char f_hname[MAXHOSTNAMELEN+1]; + char *f_hname; short sock; /* file descriptor */ enum { /* TODO: we shoud revisit these definitions */ eDestFORW, @@ -162,6 +162,9 @@ CODESTARTfreeInstance tcpclt.Destruct(&pData->pTCPClt); if(pData->sock >= 0) close(pData->sock); + + if(pData->f_hname != NULL) + free(pData->f_hname); ENDfreeInstance @@ -592,10 +595,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, @@ -701,6 +705,5 @@ CODEmodInit_QueryRegCFSLineHdlr ENDmodInit #endif /* #ifdef USE_GSSAPI */ -/* - * vi:set ai: +/* vi:set ai: */ |