[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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 respective sftp->ext member on success.

Pushed, thanks for your contribution.


-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx


References:
[PATCH] sftp: Fix memory leak on realloc failureTobias Klauser <tklauser@xxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org