From 85a76edcf3f0b13251c30528d2b9c31a9e3e8eef Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 15 Mar 2005 14:26:42 +0000 Subject: [PATCH] memory leak cleaning, more to come. git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@228 9efc2488-bf62-4759-914b-345cdb29e865 --- src/libstack/osrf_app_session.c | 5 +++++ src/libstack/osrf_stack.c | 2 ++ src/libstack/osrf_system.c | 9 +++++++++ 3 files changed, 16 insertions(+) diff --git a/src/libstack/osrf_app_session.c b/src/libstack/osrf_app_session.c index 33b1917..dde80fa 100644 --- a/src/libstack/osrf_app_session.c +++ b/src/libstack/osrf_app_session.c @@ -31,6 +31,10 @@ osrf_app_request* _osrf_app_request_init( /** Frees memory used by an app_request object */ void _osrf_app_request_free( osrf_app_request * req ){ if( req == NULL ) return; + + if( req->payload ) { + osrf_message_free( req->payload ); + } /* osrf_message* cur_msg = req->result; while( cur_msg != NULL ) { @@ -40,6 +44,7 @@ void _osrf_app_request_free( osrf_app_request * req ){ } osrf_message_free( req->payload ); */ + free( req ); } diff --git a/src/libstack/osrf_stack.c b/src/libstack/osrf_stack.c index ffb1a1b..419ce51 100644 --- a/src/libstack/osrf_stack.c +++ b/src/libstack/osrf_stack.c @@ -41,6 +41,8 @@ int osrf_stack_transport_handler( transport_message* msg ) { osrf_stack_message_handler( session, arr[i] ); } + message_free( msg ); + return 1; } diff --git a/src/libstack/osrf_system.c b/src/libstack/osrf_system.c index 6058b5e..49c606e 100644 --- a/src/libstack/osrf_system.c +++ b/src/libstack/osrf_system.c @@ -51,6 +51,15 @@ int osrf_system_bootstrap_client( char* config_file ) { return 0; } +int osrf_system_shutdown() { + config_reader_free(); + log_free(); + client_disconnect( global_client ); + client_free( global_client ); + global_client = NULL; + return 1; +} + -- 2.11.0