if (osd_seq->oos_dirs[j])
dput(osd_seq->oos_dirs[j]);
}
- OBD_FREE(osd_seq->oos_dirs,
- sizeof(struct dentry *) * osd_seq->oos_subdir_count);
+ OBD_FREE_PTR_ARRAY(osd_seq->oos_dirs,
+ osd_seq->oos_subdir_count);
}
if (osd_seq->oos_root)
osd_seq->oos_root = seq_dir;
LASSERT(osd_seq->oos_dirs == NULL);
- OBD_ALLOC(osd_seq->oos_dirs,
- sizeof(seq_dir) * osd_seq->oos_subdir_count);
+ OBD_ALLOC_PTR_ARRAY(osd_seq->oos_dirs, osd_seq->oos_subdir_count);
if (osd_seq->oos_dirs == NULL)
GOTO(out_put, rc = -ENOMEM);
if (osd_seq->oos_dirs[i] != NULL)
dput(osd_seq->oos_dirs[i]);
}
- OBD_FREE(osd_seq->oos_dirs,
- sizeof(seq_dir) * osd_seq->oos_subdir_count);
+ OBD_FREE_PTR_ARRAY(osd_seq->oos_dirs,
+ osd_seq->oos_subdir_count);
out_put:
dput(seq_dir);
osd_seq->oos_root = NULL;