From: Gunnar Beutner Date: Fri, 15 Dec 2017 21:24:08 +0000 (+0100) Subject: Replace incorrect fclose() call with pclose() X-Git-Tag: v2.9.0~283^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d96196f085829acba8dd5076157344e18b72927;p=icinga2 Replace incorrect fclose() call with pclose() --- diff --git a/lib/cli/clicommand.cpp b/lib/cli/clicommand.cpp index 6e4b8b2f2..451cbaa22 100644 --- a/lib/cli/clicommand.cpp +++ b/lib/cli/clicommand.cpp @@ -47,7 +47,8 @@ std::vector icinga::GetBashCompletionSuggestions(const String& type, con boost::algorithm::trim_right_if(wline, boost::is_any_of("\r\n")); result.push_back(wline); } - fclose(fp); + + pclose(fp); /* Append a slash if there's only one suggestion and it's a directory */ if ((type == "file" || type == "directory") && result.size() == 1) {