[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] sftp: Fix memory leak on realloc failure
[Thread Prev] | [Thread Next]
- Subject: Re: [PATCH] sftp: Fix memory leak on realloc failure
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 14 Jan 2015 12:09:53 +0100
- To: libssh@xxxxxxxxxx
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
[PATCH] sftp: Fix memory leak on realloc failure | Tobias Klauser <tklauser@xxxxxxxxxx> |