return -EINVAL;
(*info)->refcount--;
- if ((*info)->refcount == 0) {
+
+ if ((*info)->refcount < 1) {
if ((*info)->diskstats_fp) {
fclose((*info)->diskstats_fp);
(*info)->diskstats_fp = NULL;
free(*info);
*info = NULL;
-
return 0;
}
return (*info)->refcount;
{
if (info == NULL || *info == NULL)
return -EINVAL;
+
(*info)->refcount--;
- if ((*info)->refcount == 0) {
+ if ((*info)->refcount < 1) {
if ((*info)->extents)
meminfo_extents_free_all((*info));
if ((*info)->items)
free((*info)->items);
hdestroy_r(&(*info)->hashtab);
+
free(*info);
*info = NULL;
return 0;
return -EINVAL;
(*info)->refcount--;
- if ((*info)->refcount == 0) {
+
+ if ((*info)->refcount < 1) {
#ifdef UNREF_RPTHASH
pids_unref_rpthash(*info);
#endif
return -EINVAL;
(*info)->refcount--;
- if ((*info)->refcount == 0) {
+
+ if ((*info)->refcount < 1) {
if ((*info)->slabinfo_fp) {
fclose((*info)->slabinfo_fp);
(*info)->slabinfo_fp = NULL;
free(*info);
*info = NULL;
-
return 0;
}
return (*info)->refcount;
{
if (info == NULL || *info == NULL)
return -EINVAL;
+
(*info)->refcount--;
- if ((*info)->refcount == 0) {
+ if ((*info)->refcount < 1) {
if ((*info)->cpus.anchor)
free((*info)->cpus.anchor);
if ((*info)->cpus.result.stacks)
{
if (info == NULL || *info == NULL)
return -EINVAL;
+
(*info)->refcount--;
- if ((*info)->refcount == 0) {
+ if ((*info)->refcount < 1) {
if ((*info)->extents)
vmstat_extents_free_all((*info));
if ((*info)->items)
free((*info)->items);
hdestroy_r(&(*info)->hashtab);
+
free(*info);
*info = NULL;
return 0;