[asterisk-dev] [Code Review] Eliminate double close of file descriptor in manager.c

jrose reviewboard at asterisk.org
Mon Mar 5 12:01:47 CST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1793/
-----------------------------------------------------------

Review request for Asterisk Developers, Mark Michelson and Matt Jordan.


Summary
-------

Another one of those attempts to fclose something followed by using close on its file descriptor cropped up in manager.c

This just applies the same method of checking if the file is NULL before attempting fclose, checking output for close/fclose, etc. that was used with the file descriptor issue in tcptls that I used in ast_tcptls_close_session_file.  There was only one observable instance of this behavior that I noticed in manager.c, so I didn't make a new function for it.


This addresses bug ASTERISK-18453.
    https://issues.asterisk.org/jira/browse/ASTERISK-18453


Diffs
-----

  /branches/1.8/main/manager.c 358161 

Diff: https://reviewboard.asterisk.org/r/1793/diff


Testing
-------

I couldn't effectively test much here.  Like with the last file descriptor double close issue, I could not reproduce the bug on my test machines. This was the suggested approach then though, and this is a very similar situation.


Thanks,

jrose

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120305/dea77098/attachment.htm>


More information about the asterisk-dev mailing list