Subject: [libssh2] memory leak in kex.c

[libssh2] memory leak in kex.c

From: Gutjahr, Troy <Troy.Gutjahr_at_tellabs.com>
Date: Thu, 14 Jun 2007 22:18:56 -0500

I found a tricky memory leak in kex.c. The following lines of code
appear at the end of the function
libssh2_kex_method_diffie_hellman_group_exchange_sha1_key_exchange.

It's obvious, right? :-}

_libssh2_bn_free(key_state->g);
key_state->p = NULL;
_libssh2_bn_free(key_state->p);
key_state->g = NULL;

Interestingly, the same bug does not appear in the other ...key_exchange
functions.

-- Troy
============================================================
The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any reproduction,
dissemination or distribution of this communication is strictly
prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and
deleting it from your computer. Thank you. Tellabs
============================================================

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2007-06-15