Fix logical inversion when checking result from calloc
in snmp_output_err_resp(..) X-MFC with: r310987 MFC after: 3 days Reported by: Coverity CID: 1368195
This commit is contained in:
parent
1a55af1fb9
commit
b85e09dbf1
@ -2011,7 +2011,7 @@ snmp_output_err_resp(struct snmp_toolinfo *snmptoolctx, struct snmp_pdu *pdu)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((object = calloc(1, sizeof(struct snmp_object))) != NULL) {
|
||||
if ((object = calloc(1, sizeof(struct snmp_object))) == NULL) {
|
||||
fprintf(stdout, "calloc: %s", strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user