Re: [PATCH] sftp: Fix memory leak on realloc failure

2015-01-14 Thread Andreas Schneider
On Tuesday 13 January 2015 11:18:41 Tobias Klauser wrote: 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

[PATCH] sftp: Fix memory leak on realloc failure

2015-01-13 Thread Tobias Klauser
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