URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=8fc0f73ec3ee01d9ba1fccf39c2103cc7e5af8e6
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark
Commits:
8fc0f73 by Guy Harris (guy@xxxxxxxxxxxx):
Clean up file handle management.
The main reason fclose() could fail is if the file is open for writing,
not all the buffered data has been written out at the time fclose() was
called, and the attempt to write it out fails. In any case, the file
handle is no longer valid after fclose() completes, whether the close
succeeds or not, so there's no reason to keep it around.
There's no reason to check whether it's null in a loop called in code
where it's not null to start with and where it's not set to null in the
loop.
This should fix CID 1374111.
Change-Id: Ib8067a17731b41d6b184a5a415addc2ecaa7c00c
Reviewed-on: https://code.wireshark.org/review/18359
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
(cherry picked from commit a6d81effbc23acce59fd88b8f828fe8c753eeb0d)
Reviewed-on: https://code.wireshark.org/review/18360
Actions performed:
from 326ce4f cmake: add dependency to build manual pages
adds 8fc0f73 Clean up file handle management.
Summary of changes:
plugins/profinet/packet-dcerpc-pn-io.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)