From 502c2166e77201f079d5afe77f431b8821ecc6ea Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Tue, 1 Apr 2008 21:02:04 +0000 Subject: [PATCH] fixed minor mem leak on connect of diameter connection git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@831 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- apps/diameter_client/ServerConnection.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/diameter_client/ServerConnection.cpp b/apps/diameter_client/ServerConnection.cpp index 471b2e0a..1b4c2173 100644 --- a/apps/diameter_client/ServerConnection.cpp +++ b/apps/diameter_client/ServerConnection.cpp @@ -223,6 +223,8 @@ void ServerConnection::openConnection() { return; } + AAAFreeMessage(&cer); + AAAMessage* cea = NULL; res = tcp_recv_reply(conn.sockfd, &conn.rb, &cea, CONNECT_CEA_REPLY_TIMEOUT, 0); @@ -238,6 +240,8 @@ void ServerConnection::openConnection() { if (cea != NULL) AAAPrintMessage(cea); #endif + + AAAFreeMessage(&cea); DBG("Connection opened.\n"); open = true;