diff options
author | Joursoir <chat@joursoir.net> | 2021-11-27 17:04:08 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-11-27 17:04:08 +0300 |
commit | d5212c2a4b474f65ea232ca0f29517dcc7e76941 (patch) | |
tree | 9b5f01bd9655e2fb288a3d7faca40657905d6e2a /Library/UefiShellUfmCommandLib/panel.c | |
parent | f031dc9d65df69a74efa9a2021fcdecd59b79702 (diff) | |
download | ufm-d5212c2a4b474f65ea232ca0f29517dcc7e76941.tar.gz ufm-d5212c2a4b474f65ea232ca0f29517dcc7e76941.tar.bz2 ufm-d5212c2a4b474f65ea232ca0f29517dcc7e76941.zip |
panel: use 'cwd' as non-const variable
Diffstat (limited to 'Library/UefiShellUfmCommandLib/panel.c')
-rw-r--r-- | Library/UefiShellUfmCommandLib/panel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/UefiShellUfmCommandLib/panel.c b/Library/UefiShellUfmCommandLib/panel.c index 3c6cc6c..66f3b13 100644 --- a/Library/UefiShellUfmCommandLib/panel.c +++ b/Library/UefiShellUfmCommandLib/panel.c @@ -70,14 +70,13 @@ struct panel_ctx *panel_alloc(struct screen *scr, CONST CHAR16 *path, return NULL; } - panel->cwd = path; panel->name_cols = name_cols; panel->curline = 1; panel->list_lines = lines - 5; panel->start_entry = 1; wrefresh(panel->wbg); - res = panel_show(panel, panel->cwd); + res = panel_show(panel, path); if(!res) { panel_release(panel); return NULL; @@ -99,6 +98,8 @@ VOID panel_release(struct panel_ctx *p) delwin(p->wfname); if(p->wmarked) delwin(p->wmarked); + if(p->cwd) + FreePool(p->cwd); FreePool(p); } |