]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Eliminate double close of file descriptor in manager.c
authorJonathan Rose <jrose@digium.com>
Mon, 5 Mar 2012 18:58:40 +0000 (18:58 +0000)
committerJonathan Rose <jrose@digium.com>
Mon, 5 Mar 2012 18:58:40 +0000 (18:58 +0000)
commit15c1391da060ce739e067171f89c384a0a96f379
treeec80a275c1ef74eda8d66619b985c36c9a55ade1
parent732eaebec787446b0179742ce779098625269ec8
Eliminate double close of file descriptor in manager.c

The process_output function in manager.c attempted to call fclose and close immediately
afterwards. Since fclose implies close, this resulted in a potential double free on file
descriptors. This patch changes that behavior and also adds error checking to fclose and
close depending on which was deemed necessary. Also error messages. Thanks to Rosen
Iliev for pointing out the location of the problem.

(closes issue ASTERISK-18453)
Reported By: Jaco Kroon
Review: https://reviewboard.asterisk.org/r/1793/
........

Merged revisions 358214 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@358215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/manager.c