Wireshark-commits: [Wireshark-commits] master 0327078: Only do save_errno = errno and errno = save_

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 22 Feb 2017 01:43:01 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0327078837bb5189c53080ef259d99e6c7075e6b
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

0327078 by Guy Harris (guy@xxxxxxxxxxxx):

    Only do save_errno = errno and errno = save_errno around g_free();
    
    There is *no* need to do it around an assignment statement.  (We
    *probably* don't need to do it around g_free(), but better safe than
    sorry - maybe some memory allocator makes system calls to hand regions
    of the address space back.)
    
    Change-Id: Ib57540cc36b505aadf4a5e8885b9a744a35b1f75
    Reviewed-on: https://code.wireshark.org/review/20236
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  50dff6e   Make sure we zero out the newly allocated list, otherwise g_list append may dereference ->next containing an arbitrary value.
    adds  0327078   Only do save_errno = errno and errno = save_errno around g_free();


Summary of changes:
 wsutil/filesystem.c |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)