mirror of git://git.sysmocom.de/ofono
Fix file descriptor leakage when closing PPP recording
This commit is contained in:
parent
313eb4f285
commit
0e178517ce
|
@ -536,8 +536,10 @@ void g_at_ppp_set_recording(GAtPPP *ppp, const char *filename)
|
|||
if (ppp == NULL)
|
||||
return;
|
||||
|
||||
if (ppp->record_fd > fileno(stderr))
|
||||
if (ppp->record_fd > fileno(stderr)) {
|
||||
close(ppp->record_fd);
|
||||
ppp->record_fd = -1;
|
||||
}
|
||||
|
||||
if (filename == NULL)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue