Changeset af918191e4b6f22a8b9b3a3d3b6f02288031e306

Show
Ignore:
Timestamp:
04/10/08 18:38:21 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1207852701 +0000
git-parent:

[0c17b8ad7cf0f3be6cc19bb8def4f75a52757fb6]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1207852701 +0000
Message:

check for failed snmp_pdu_create

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/snmp.c

    r1384106 raf91819  
    417417 
    418418  req = snmp_pdu_create(SNMP_MSG_GET); 
    419   noit_snmp_fill_req(req, check); 
     419  if(req) noit_snmp_fill_req(req, check); 
    420420  /* Setup out snmp requests */ 
    421   if(ts->sess_handle && 
     421  if(ts->sess_handle && req && 
    422422     (info->reqid = snmp_sess_send(ts->sess_handle, req)) != 0) { 
    423423    struct timeval when, to; 
     
    438438     noit_snmp_session_cleanse(ts); 
    439439    /* Error */ 
    440     snmp_free_pdu(req); 
     440    if(req) snmp_free_pdu(req); 
    441441    /* Log our findings */ 
    442442    noit_snmp_log_results(self, check, NULL);