[lustre-devel] [PATCH 03/20] lustre: obdclass: free inst_name correctly
James Simmons <[email protected]>
| Newsgroups | org.lustre.lists.lustre-devel |
|---|---|
| Message-ID | <[email protected]> |
From: Emoly Liu <[email protected]> In functon class_config_llog_handler(), inst_name should be freed correctly before break. WC-bug-id: https://jira.whamcloud.com/browse/LU-16154 Lustre-commit: e7f17c5e0c95dba3b ("LU-16154 obdclass: free inst_name correctly") Signed-off-by: Emoly Liu <[email protected]> Reviewed-on: https://review.whamcloud.com/48542 Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: Zhenyu Xu <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: James Simmons <[email protected]> --- fs/lustre/obdclass/obd_config.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/lustre/obdclass/obd_config.c b/fs/lustre/obdclass/obd_config.c index 7d001ffaf121..2b24276880a6 100644 --- a/fs/lustre/obdclass/obd_config.c +++ b/fs/lustre/obdclass/obd_config.c @@ -1230,7 +1230,7 @@ int class_config_llog_handler(const struct lu_env *env, clli->cfg_flags); rc = 0; /* No processing! */ - break; + goto out_inst; } /* @@ -1352,7 +1352,7 @@ int class_config_llog_handler(const struct lu_env *env, lcfg_new = kzalloc(lcfg_len, GFP_NOFS); if (!lcfg_new) { rc = -ENOMEM; - goto out; + goto out_inst; } lustre_cfg_init(lcfg_new, lcfg->lcfg_command, &bufs); @@ -1379,6 +1379,7 @@ int class_config_llog_handler(const struct lu_env *env, rc = class_process_config(lcfg_new); kfree(lcfg_new); +out_inst: kfree(inst_name); break; } -- 2.27.0 _______________________________________________ lustre-devel mailing list [email protected] http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org