mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 08:40:42 +01:00
mmsnmptrapd: fix potential NULL pointer use
Deteced by clang static analyzer
This commit is contained in:
parent
e447300569
commit
bc2cc8feb2
@ -7,7 +7,7 @@
|
||||
*
|
||||
* File begun on 2011-05-05 by RGerhards
|
||||
*
|
||||
* Copyright 2011 Rainer Gerhards and Adiscon GmbH.
|
||||
* Copyright 2011-2017 Rainer Gerhards and Adiscon GmbH.
|
||||
*
|
||||
* This file is part of rsyslog.
|
||||
*
|
||||
@ -340,8 +340,8 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
|
||||
|
||||
/* finally build the instance */
|
||||
if(cs.pszTagName == NULL) {
|
||||
pData->pszTagName = (uchar*) strdup("snmptrapd:");
|
||||
pData->pszTagID = (uchar*) strdup("snmptrapd/");
|
||||
CHKmalloc(pData->pszTagName = (uchar*) strdup("snmptrapd:"));
|
||||
CHKmalloc(pData->pszTagID = (uchar*) strdup("snmptrapd/"));
|
||||
} else {
|
||||
int lenTag = ustrlen(cs.pszTagName);
|
||||
/* new tag value (with colon at the end) */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user