Wireshark-commits: [Wireshark-commits] master b837511: Avoid the realloc() warning from VS Code Ana
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 10 Mar 2018 01:53:02 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=b8375119e39bebed34344cf1a6953af1532d2b62
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

b837511 by Guy Harris (guy@xxxxxxxxxxxx):

    Avoid the realloc() warning from VS Code Analyzer.
    
    It's not just worrying about the lack of a check for a null return, it's
    worried about the leak.  Assign the result to a different variable and,
    if the result is null, free the old data before exiting, and if it's not
    null, assign the new variable to the one we're using as a pointer to the
    array.
    
    Change-Id: Ia1d5d271293e13708c35a7562a1f40671304c417
    Reviewed-on: https://code.wireshark.org/review/26410
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  dcc3875   Add ws_pipe_kill_child_on_exit.
    adds  b837511   Avoid the realloc() warning from VS Code Analyzer.


Summary of changes:
 mmdbresolve.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)