I'm trying to track down the source of memory leak that my unit-tests
detect after calling libssh2_sftp_fstat_ex().

Can someone familiar with sftp.c explain why the memory allocated to
'data' by is freed when the conditional 'data[0] == SSH_FXP_STATUS'
holds but not when it doesn't (line 1605 & 1609 of the latest version
of sftp.c)?  I've taken a look at other functions that use
sftp_packet_requirev() to allocate memory in the same way and they all
take care to free 'data' in a number of different exit paths.

Of course, there is probably a sensible explanation for doing it this
way - i understand very little of the sftp.c code.

Thanks.

Alex
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to