Memory leak plugged by Scott McKellar:
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 7 Jan 2008 01:57:18 +0000 (01:57 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 7 Jan 2008 01:57:18 +0000 (01:57 +0000)
In handle_request() we allocate a growing_buffer and pass the pointer
to send_request().  However we weren't freeing the growing_buffer
after the return from send_request().

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1206 9efc2488-bf62-4759-914b-345cdb29e865

src/srfsh/srfsh.c

index df92ed6..ae34af5 100644 (file)
@@ -534,7 +534,9 @@ static int handle_request( char* words[], int relay ) {
                        buffer_add(buffer, "]");
                }
 
-               return send_request( server, method, buffer, relay );
+               int rc = send_request( server, method, buffer, relay );
+               buffer_free( buffer );
+               return rc;
        } 
 
        return 0;