Browse Source

fix: closes the opened file descriptors

pull/56/head
David Bensoussan 7 years ago
parent
commit
440634a280
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      wiringPi/wiringPi.c

+ 3
- 0
wiringPi/wiringPi.c View File

@@ -733,6 +733,7 @@ int piGpioLayout (void)
fprintf (stderr, "to projects@drogon.net. If this is not a Raspberry Pi then you\n") ;
fprintf (stderr, "are on your own as wiringPi is designed to support the\n") ;
fprintf (stderr, "Raspberry Pi ONLY.\n") ;
fclose(dtcFd);
exit (EXIT_FAILURE) ;
}

@@ -743,6 +744,8 @@ int piGpioLayout (void)
if (wiringPiDebug)
printf ("piGpioLayoutOops: Returning revision: %d\n", gpioLayout) ;

fclose(dtcFd);

return gpioLayout ;
}



Loading…
Cancel
Save