fix: call workfree to void mem leak
Signed-off-by: black-desk <me@black-desk.cn>
This commit is contained in:
parent
a2f91cc525
commit
38c9c09487
@ -430,6 +430,7 @@ bool StartManager::launch(DesktopInfo *info, QString cmdLine, uint32_t timestamp
|
||||
auto ret = wordexp(stdCmdLine.c_str(), &words, 0);
|
||||
if (ret != 0) {
|
||||
qCritical() << "wordexp failed, error code:" << ret;
|
||||
wordfree(&words);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -437,6 +438,8 @@ bool StartManager::launch(DesktopInfo *info, QString cmdLine, uint32_t timestamp
|
||||
exeArgs << words.we_wordv[i];
|
||||
}
|
||||
|
||||
wordfree(&words);
|
||||
|
||||
handleRecognizeArgs(exeArgs, files);
|
||||
|
||||
if (info->getTerminal()) {
|
||||
|
Loading…
Reference in New Issue
Block a user