Wireshark-commits: [Wireshark-commits] master 0b64a3a: Fix the check for ws_fdopen() failure.

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 24 Jan 2020 18:51:41 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0b64a3afc06bf90c9158b62d8692d6a974ab7f29
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

0b64a3a by Guy Harris (guy@xxxxxxxxxxxx):

    Fix the check for ws_fdopen() failure.
    
    If tf.handle() fails, it returns -1; we shouldn't call ws_fdopen() on
    its return value.  (I'm not sure whether it can fail, but this code is
    all a bit twisty.)
    
    If tf.handle() succeeds, and we hand its return value to ws_fdopen(),
    and we get back NULL, *that* indicates that ws_fdopen() failed.
    
    This should fix Coverity CID 1457929, preventing a FILE leak.
    
    Change-Id: I23bb04579d26928037f8b9284b7741affc3596f7
    Reviewed-on: https://code.wireshark.org/review/35940
    Petri-Dish: Guy Harris <guy@xxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  8a79d270  SIP: share dissector status value_string array with tshark SIP stats
     add  0b64a3a   Fix the check for ws_fdopen() failure.


Summary of changes:
 ui/qt/endpoint_dialog.cpp | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)