Skip to content

Fix missing memory free functions in pki_key_to_blob().

Feynman-young requested to merge Feynman-young/libssh-mirror:patch into master

The details are shown in issue #252 (closed). The valgrind mem-check results are shown below.

$ valgrind --tool=memcheck --leak-check=full ./torture_pki_ecdsa 
==5128== Memcheck, a memory error detector
==5128== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==5128== Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyright info
==5128== Command: ./torture_pki_ecdsa
==5128== HEAP SUMMARY:
==5128==     in use at exit: 0 bytes in 0 blocks
==5128==   total heap usage: 484,192 allocs, 484,192 frees, 54,686,470 bytes allocated
==5128== 
==5128== All heap blocks were freed -- no leaks are possible
==5128== 
==5128== For lists of detected and suppressed errors, rerun with: -s
==5128== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

$ valgrind --tool=memcheck --leak-check=full ./torture_pki_rsa 
==5162== Memcheck, a memory error detector
==5162== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==5162== Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyright info
==5162== Command: ./torture_pki_rsa
==5162== HEAP SUMMARY:
==5162==     in use at exit: 0 bytes in 0 blocks
==5162==   total heap usage: 194,081 allocs, 194,081 frees, 23,645,454 bytes allocated
==5162== 
==5162== All heap blocks were freed -- no leaks are possible
==5162== 
==5162== For lists of detected and suppressed errors, rerun with: -s
==5162== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Checklist

  • Commits have Signed-off-by: with name/author being identical to the commit author
  • Code modified for feature
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated

Reviewer's checklist:

  • Any issues marked for closing are addressed
  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTING.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code
Edited by Sahana Prasad

Merge request reports

Loading