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;