~ubuntu-branches/ubuntu/trusty/monit/trusty-proposed

« back to all changes in this revision

Viewing changes to src/process/sysdep_NETBSD.c

  • Committer: Package Import Robot
  • Author(s): Sergey B Kirpichev
  • Date: 2013-09-05 17:03:07 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20130905170307-ae94md1vagm60e41
Tags: 1:5.6-1
ImportedĀ UpstreamĀ versionĀ 5.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
169
169
  pt = CALLOC(sizeof(ProcessTree_T), treesize);
170
170
 
171
171
  if (! (kvm_handle = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, buf))) {
 
172
    FREE(pinfo);
 
173
    FREE(pt);
172
174
    LogError("system statistic error -- kvm_openfiles failed: %s", buf);
173
175
    return FALSE;
174
176
  }
191
193
      pt[i].cmdline = Str_dup(StringBuffer_toString(StringBuffer_trim(cmdline)));
192
194
      StringBuffer_free(&cmdline);
193
195
    }
194
 
    if (! pt[i].cmdline || ! *pt[i].cmdline)
 
196
    if (! pt[i].cmdline || ! *pt[i].cmdline) {
 
197
      FREE(pt[i].cmdline);
195
198
      pt[i].cmdline = Str_dup(pinfo[i].p_comm);
 
199
    }
196
200
  }
197
201
  FREE(pinfo);
198
202
  kvm_close(kvm_handle);