mirror of
https://gitee.com/openharmony/filemanagement_storage_service
synced 2024-11-23 15:09:48 +00:00
修改getline()内存未释放
Signed-off-by: zhangsaiyang <zhangsaiyang@huawei.com>
This commit is contained in:
parent
bba4f7e0ab
commit
ec0e2dc4d5
@ -109,12 +109,16 @@ bool Process::CheckMaps(std::string pidPath)
|
||||
if (CheckSubDir(line)) {
|
||||
LOGI("Found map in %{public}s", pidPath.c_str());
|
||||
(void)fclose(file);
|
||||
free(buf);
|
||||
buf = nullptr;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(void)fclose(file);
|
||||
free(buf);
|
||||
buf = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user