summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/dtmfio/dtmfio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/dtmfio/dtmfio.c b/modules/dtmfio/dtmfio.c
index ce88743..e159888 100644
--- a/modules/dtmfio/dtmfio.c
+++ b/modules/dtmfio/dtmfio.c
@@ -130,7 +130,10 @@ static int module_close(void)
{
uag_event_unregister(ua_event_handler);
- fclose(fd);
+ if (fd) {
+ fclose(fd);
+ fd = NULL;
+ }
unlink(DTMF_OUT);