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:
Enji Cooper 2017-01-04 01:44:45 +00:00
parent 1a55af1fb9
commit b85e09dbf1

View File

@ -2011,7 +2011,7 @@ snmp_output_err_resp(struct snmp_toolinfo *snmptoolctx, struct snmp_pdu *pdu)
return; 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)); fprintf(stdout, "calloc: %s", strerror(errno));
return; return;
} }