Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-9513 liblustre: always check return value
[fs/lustre-release.git]
/
lustre
/
utils
/
liblustreapi_layout.c
diff --git
a/lustre/utils/liblustreapi_layout.c
b/lustre/utils/liblustreapi_layout.c
index
557765d
..
dbf1369
100644
(file)
--- a/
lustre/utils/liblustreapi_layout.c
+++ b/
lustre/utils/liblustreapi_layout.c
@@
-1962,6
+1962,11
@@
int llapi_layout_file_comp_del(const char *path, uint32_t id, uint32_t flags)
llapi_layout_comp_extent_set(layout, 0, LUSTRE_EOF);
comp = __llapi_layout_cur_comp(layout);
+ if (comp == NULL) {
+ llapi_layout_free(layout);
+ return -1;
+ }
+
comp->llc_id = id;
comp->llc_flags = flags;