]> granicus.if.org Git - icinga2/commitdiff
Replace incorrect fclose() call with pclose() 5872/head
authorGunnar Beutner <gunnar.beutner@icinga.com>
Fri, 15 Dec 2017 21:24:08 +0000 (22:24 +0100)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Fri, 15 Dec 2017 21:25:08 +0000 (22:25 +0100)
lib/cli/clicommand.cpp

index 6e4b8b2f2c6c23eae9a79d476618988ebca5d1a6..451cbaa228fd196de0a2b31b2b777e6a0f3cf2c0 100644 (file)
@@ -47,7 +47,8 @@ std::vector<String> 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) {