[LibOS] thread: add error handling for dentry_get_path()

This commit is contained in:
Paweł Marczewski
2020-09-09 21:05:21 +02:00
committed by Michał Kowalczyk
parent 3388229dc5
commit 016bed7e9e
+8 -4
View File
@@ -118,8 +118,10 @@ static int find_thread_link(const char* name, struct shim_qstr* link, struct shi
dent = next_dent;
}
if (link)
dentry_get_path_into_qstr(dent, link);
if (link && !dentry_get_path_into_qstr(dent, link)) {
ret = -ENOMEM;
goto out;
}
if (dentptr) {
get_dentry(dent);
@@ -361,8 +363,10 @@ static int find_thread_each_fd(const char* name, struct shim_qstr* link,
dent = next_dent;
}
if (link)
dentry_get_path_into_qstr(dent, link);
if (link && !dentry_get_path_into_qstr(dent, link)) {
ret = -ENOMEM;
goto out;
}
if (dentptr) {
get_dentry(dent);