diff options
| author | Tobias Klauser <tklauser@distanz.ch> | 2015-01-13 11:18:41 +0100 |
|---|---|---|
| committer | Andreas Schneider <asn@cryptomilk.org> | 2015-01-14 10:22:55 +0100 |
| commit | 15d71a8c51b93efd169cb2779ba442abdbcd1f5f (patch) | |
| tree | 794915e32439317b9bb20cdf2406176ffa0c091b /CodingStyle | |
| parent | 8536cd9808b78a9037e848f37fa8b565d3c55b67 (diff) | |
| download | libssh-15d71a8c51b93efd169cb2779ba442abdbcd1f5f.tar.gz libssh-15d71a8c51b93efd169cb2779ba442abdbcd1f5f.tar.xz libssh-15d71a8c51b93efd169cb2779ba442abdbcd1f5f.zip | |
sftp: Fix memory leak on realloc failure
If realloc of sftp->ext->name or sftp->ext->data fails, the memory
previously allocated for the respective member is leaked. Fix this by
storing the return value of realloc() in a temporary variable which only
gets assigned to the respective sftp->ext member on success.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'CodingStyle')
0 files changed, 0 insertions, 0 deletions
