memory leak cleaning, more to come.
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 15 Mar 2005 14:26:42 +0000 (14:26 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 15 Mar 2005 14:26:42 +0000 (14:26 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@228 9efc2488-bf62-4759-914b-345cdb29e865

src/libstack/osrf_app_session.c
src/libstack/osrf_stack.c
src/libstack/osrf_system.c

index 33b1917..dde80fa 100644 (file)
@@ -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 );
 }
 
index ffb1a1b..419ce51 100644 (file)
@@ -41,6 +41,8 @@ int osrf_stack_transport_handler( transport_message* msg ) {
                osrf_stack_message_handler( session, arr[i] );
        }
 
+       message_free( msg );
+
        return 1;
 }
 
index 6058b5e..49c606e 100644 (file)
@@ -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;
+}
+