don't set procargs.size = 0 else destroy won't free
This commit is contained in:
parent
6259451277
commit
0bee437f85
|
@ -901,7 +901,7 @@ int sigar_os_proc_args_get(sigar_t *sigar, sigar_pid_t pid,
|
||||||
pinfo = sigar->pinfo;
|
pinfo = sigar->pinfo;
|
||||||
|
|
||||||
if (pinfo->pr_argc == 0) {
|
if (pinfo->pr_argc == 0) {
|
||||||
procargs->number = procargs->size = 0;
|
procargs->number = 0;
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
else if (pinfo->pr_dmodel != PR_MODEL_NATIVE) {
|
else if (pinfo->pr_dmodel != PR_MODEL_NATIVE) {
|
||||||
|
|
Loading…
Reference in New Issue