diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-04-12 17:33:44 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-04-12 17:34:24 -0700 |
commit | 0e178517ce6df2e33f529cc5a20c73eb4f9c7657 (patch) | |
tree | 6d67288fece4d377aa87501bf2af3f25146bf586 | |
parent | 313eb4f285e17ba1ee98916d25d00eb65b7fc900 (diff) | |
download | ofono-0e178517ce6df2e33f529cc5a20c73eb4f9c7657.tar.bz2 |
Fix file descriptor leakage when closing PPP recording
-rw-r--r-- | gatchat/gatppp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c index b98ab14d..259fdeb0 100644 --- a/gatchat/gatppp.c +++ b/gatchat/gatppp.c @@ -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; |