rc = obd_destroy(NULL, ll_i2dtexp(dir), oa, lsm, &oti,
ll_i2mdexp(dir), oc);
capa_put(oc);
- OBDO_FREE(oa);
if (rc)
CERROR("obd destroy objid "LPX64" error %d\n",
lsm->lsm_object_id, rc);
out_free_memmd:
obd_free_memmd(ll_i2dtexp(dir), &lsm);
+ OBDO_FREE(oa);
out:
return rc;
}
fm_end_offset = fiemap_calc_fm_end_offset(fiemap, lsm, fm_start,
fm_end, &start_stripe);
if (fm_end_offset == -EINVAL)
- return -EINVAL;
+ GOTO(out, rc = -EINVAL);
if (fiemap->fm_extent_count == 0) {
get_num_extents = 1;
} else {
LASSERT(IS_MDT(lsi));
rc = server_name2svname(lsi->lsi_svname, inst, NULL);
- if (rc)
+ if (rc) {
+ OBD_FREE(inst, CFS_PAGE_SIZE);
RETURN(-EINVAL);
+ }
pos = strlen(inst);
}
OBD_ALLOC_PTR(uuid);
if (uuid == NULL) {
mutex_unlock(&osp_register_list_lock);
+ OBD_FREE_PTR(ori);
RETURN(-ENOMEM);
}
memcpy(uuid->uuid, ospname, strlen(ospname));
OBD_ALLOC_PTR(bufs);
if (bufs == NULL)
- RETURN(-ENOMEM);
+ GOTO(out, rc = -ENOMEM);
lustre_cfg_bufs_reset(bufs, ospname);
lustre_cfg_bufs_set_string(bufs, 1,
int type, uint blk, uint index,
struct osd_it_quota *it)
{
- dqbuf_t buf = getdqbuf();
+ dqbuf_t buf;
loff_t ret = 0;
struct lustre_disk_dqdbheader *dqhead;
int i, dqblk_sz;
RETURN(1);
}
+ buf = getdqbuf();
dqhead = (struct lustre_disk_dqdbheader *)buf;
dqblk_sz = sizeof(struct lustre_disk_dqblk_v2);
if (!buf)
}
rc = ioctl(fd, LL_IOC_RMTACL, ops);
+ close(fd);
if (rc < 0) {
rc = -errno;
llapi_error(LLAPI_MSG_ERROR, rc, "ioctl %d\n", fd);
out:
endmntent(fp);
- if (fd >= 0)
- close(fd);
return ((rc != 0) ? rc : found);
}