Menu

#182 Double free(xform) in ssl_shutdown() in common/transformation_ssl.c

None
closed
None
5
2024-12-01
2024-11-24
dreamlayers
No

While building on Raspbian bookworm on my Raspberry Pi using gcc 12, I got this warning:

transformation_ssl.c: In function 'ssl_shutdown':
transformation_ssl.c:133:9: warning: pointer 'xform' used after 'free' [-Wuse-after-free]
133 | free(xform);
| ^~~~~~~~~~~
transformation_ssl.c:128:9: note: call to 'free' here
128 | free(xform);
| ^~~~~~~~~~~

The warning seems correct. I'm attaching a patch to remove the second free(xform).

1 Attachments

Discussion

  • Tim Woodall

    Tim Woodall - 2024-11-25

    Thanks for this. I'm dropping this file completely in 0.4b49 which will hopefully not be too long now.

    If you're interested in seeing the current state of play then I have a branch here:
    https://sourceforge.net/u/locofungus/dump/ci/963be3bd17f024fb5376547ba1da3802834500ad/log/?path=

    Please note that this isn't stable, I will rewrite it at a whim and it contains some things that I need for my development but are not approprate in the final repo (but won't cause any harm)

     
  • Tim Woodall

    Tim Woodall - 2024-11-25
    • status: open --> pending
    • assigned_to: Tim Woodall
    • Group: -->
     
  • Tim Woodall

    Tim Woodall - 2024-12-01
    • status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB