• St4lkerino's avatar
    Fix realloc(3) error handling · 43004384
    St4lkerino authored
    From realloc(3) manpage:
           The realloc() function returns a pointer to the newly allocated memory,
           which  is  suitably  aligned for any built-in type and may be different
           from ptr, or NULL if the request fails.  If size was equal to 0, either
           NULL  or  a  pointer  suitable  to be passed to free() is returned.  If
           realloc() fails, the original block is left untouched; it is not  freed
           or moved.
    
    If realloc() fails then the memory that was previously allocated needs
    to be freed, or it will create a memory leak.
    
    It was not a real problem because if realloc(3) failed then pcscd would
    exit immediatly and the memory would not leak for a long time.
    
    Thanks to PA193 project
    https://github.com/vegaMato/PCSC-lite-project-tasks
    43004384
Name
Last commit
Last update
UnitaryTests Loading commit data...
doc Loading commit data...
etc Loading commit data...
m4 Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
GPL-3.0.txt Loading commit data...
HELP Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README.md Loading commit data...
SECURITY Loading commit data...
TODO Loading commit data...
bootstrap Loading commit data...
c.sh Loading commit data...
clang-analyze.sh Loading commit data...
configure.ac Loading commit data...
splint.sh Loading commit data...
stamp-h.in Loading commit data...