X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Futils%2Fobd.c;h=20ec5f4fd8e1185215809eb0015a73bb52e2e027;hp=aa9117f9de4e178425f742748194d6cab0f3b56e;hb=2d15edc7be83555a7fa17a666d99b6af4922ab82;hpb=825570b0b03e0fd70aba5400dedca4e6d94d5141 diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c index aa9117f..20ec5f4 100644 --- a/lustre/utils/obd.c +++ b/lustre/utils/obd.c @@ -3209,9 +3209,9 @@ static int pool_cmd(enum lcfg_command_type cmd, if (ostname != NULL) lustre_cfg_bufs_set_string(&bufs, 2, ostname); - lcfg = lustre_cfg_new(cmd, &bufs); + lcfg = lustre_cfg_new(cmd, &bufs); if (lcfg == NULL) - return rc; + return -ENOMEM; memset(&data, 0, sizeof(data)); rc = data.ioc_dev = get_mgs_device(); @@ -3228,6 +3228,7 @@ static int pool_cmd(enum lcfg_command_type cmd, if (rc) { fprintf(stderr, "error: %s: invalid ioctl\n", jt_cmdname(cmdname)); + lustre_cfg_free(lcfg); return rc; } rc = l_ioctl(OBD_DEV_ID, OBD_IOC_POOL, buf);