libprocstat: fix memory leak
Free the rlimits array on the happy path in procstat_getrlimit_core(). Reported by: Coverity CID: 1373328 Sponsored by: Dell EMC
This commit is contained in:
parent
0b1f36b6c5
commit
9b20744177
@ -2192,6 +2192,7 @@ procstat_getrlimit_core(struct procstat_core *core, int which,
|
||||
return (-1);
|
||||
}
|
||||
*rlimit = rlimits[which];
|
||||
free(rlimits);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user