path: root/tests
diff options
authorEric B Munson <emunson@mgebm.net>2012-03-10 15:22:51 -0500
committerEric B Munson <emunson@mgebm.net>2012-03-22 11:57:52 -0400
commit4f5a61606afe6911bd15f1f0645a2240eafbf7ed (patch)
tree9edeafc91255b8af784b9a985a96c0e86eaf86e1 /tests
parentde913f90de3c72b3223d4cbae54296cbeaeae4c5 (diff)
Decrement index before closing files on error exit
If obtain_prepared_file fails for any reason, the last fd in our hugetlb segment table will be 0 when the error clean up starts because obtain_prepared_file does not write to the segment structure in error cases. Because the cleanup for loop starts at the segment where obtain_prepared_file failed it will try to close stdout (fd 0). This patch makes the cleanup for loop decrement the index before starting to close file descriptors. Reported-by: Dan Scales <scales@vmware.com> Signed-off-by: Eric B Munson <emunson@mgebm.net>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions