mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Prevent a couple of file descriptor leaks.
All checks were successful
Remind unit tests / tests (push) Successful in 28s
All checks were successful
Remind unit tests / tests (push) Successful in 28s
This commit is contained in:
@@ -1119,6 +1119,8 @@ guess_terminal_background(int *r, int *g, int *b)
|
||||
|
||||
if (n != 8) {
|
||||
/* write failed... WTF? Not much we can do */
|
||||
tty_reset(ttyfd);
|
||||
close(ttyfd);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1142,6 +1144,7 @@ guess_terminal_background(int *r, int *g, int *b)
|
||||
return;
|
||||
}
|
||||
tty_reset(ttyfd);
|
||||
close(ttyfd);
|
||||
buf[n+1] = 0;
|
||||
if (n < 25) {
|
||||
/* Too short */
|
||||
|
||||
Reference in New Issue
Block a user