diff options
Diffstat (limited to 'runtime/nspoll.c')
-rw-r--r-- | runtime/nspoll.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/runtime/nspoll.c b/runtime/nspoll.c index 43631f4..94fba03 100644 --- a/runtime/nspoll.c +++ b/runtime/nspoll.c @@ -6,25 +6,21 @@ * * Work on this module begun 2009-11-18 by Rainer Gerhards. * - * Copyright 2009 Rainer Gerhards and Adiscon GmbH. + * Copyright 2009-2014 Rainer Gerhards and Adiscon GmbH. * - * This file is part of the rsyslog runtime library. - * - * The rsyslog runtime library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * The rsyslog runtime library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with the rsyslog runtime library. If not, see <http://www.gnu.org/licenses/>. - * - * A copy of the GPL can be found in the file "COPYING" in this distribution. - * A copy of the LGPL can be found in the file "COPYING.LESSER" in this distribution. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * -or- + * see COPYING.ASL20 in the source distribution + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include "config.h" @@ -66,6 +62,7 @@ loadDrvr(nspoll_t *pThis) uchar szDrvrName[48]; /* 48 shall be large enough */ pBaseDrvrName = pThis->pBaseDrvrName; + if(pBaseDrvrName == NULL) /* if no drvr name is set, use system default */ pBaseDrvrName = glbl.GetDfltNetstrmDrvr(); if(snprintf((char*)szDrvrName, sizeof(szDrvrName), "lmnsdpoll_%s", pBaseDrvrName) == sizeof(szDrvrName)) ABORT_FINALIZE(RS_RET_DRVRNAME_TOO_LONG); @@ -105,6 +102,7 @@ CODESTARTobjDestruct(nspoll) * a driver name string as load indicator (because we also need that string * to release the driver */ + free(pThis->pBaseDrvrName); if(pThis->pDrvrName != NULL) { obj.ReleaseObj(__FILE__, pThis->pDrvrName+2, DONT_LOAD_LIB, (void*) &pThis->Drvr); free(pThis->pDrvrName); |