]> git.ozlabs.org Git - ppp.git/commitdiff
plugins/winbind: Use fclose() to match with fdopen()
authorPaul Mackerras <paulus@ozlabs.org>
Tue, 20 Aug 2024 09:30:33 +0000 (19:30 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 20 Aug 2024 09:30:33 +0000 (19:30 +1000)
Having done fdopen() on a couple of file descriptors, we then need to
use fclose() to close them rather than close().

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
pppd/plugins/winbind.c

index 7f930dfc2ce493ef9f1a825a365eb0f2e6dbc7c2..a3e5aa003883c718cea73e591d191e77ba5595b8 100644 (file)
@@ -432,14 +432,14 @@ unsigned int run_ntlm_auth(const char *username,
        }
 
         /* parent */
-        if (close(child_out[0]) == -1) {
-                close(child_in[1]);
+        if (fclose(pipe_out) == -1) {
+                fclose(pipe_in);
                 notice("error closing pipe?!? for child OUT[0]");
                 return NOT_AUTHENTICATED;
         }
 
        /* parent */
-        if (close(child_in[1]) == -1) {
+        if (fclose(pipe_in) == -1) {
                 notice("error closing pipe?!? for child IN[1]");
                 return NOT_AUTHENTICATED;
         }