X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Futils%2Fliblustreapi.c;h=848a72d4b7f45023fcf6171b1ebc2cb4712c5927;hp=3417c77eab4fc2d47dbc102748af9a1117098585;hb=3e2e0025d1e929763f9d4de48746c3433d3684d5;hpb=45222b2ef279d62ac3aab0e7babc55d77e3c93a2 diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index 3417c77..848a72d 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -1454,6 +1454,9 @@ int llapi_search_fsname(const char *pathname, char *fsname) int llapi_search_rootpath(char *pathname, const char *fsname) { + /* pathname can be used as an argument by get_root_path(), + * clear it for safety */ + pathname[0] = 0; return get_root_path(WANT_PATH, (char *)fsname, NULL, pathname, -1); }