Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information