Plug a memory leak reported by Steven Chan.
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 31 Mar 2009 02:08:48 +0000 (02:08 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 31 Mar 2009 02:08:48 +0000 (02:08 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1687 9efc2488-bf62-4759-914b-345cdb29e865

src/srfsh/srfsh.c

index 176e239..7a44546 100644 (file)
@@ -635,6 +635,7 @@ int send_request( char* server,
                                                omsg->status_name, omsg->status_text, code );
 
                                fflush(stdout);
+                               osrfMessageFree(omsg);
                        }
 
                } else {
@@ -674,6 +675,7 @@ int send_request( char* server,
                                char code[16];
                                snprintf( code, sizeof(code), "%d", omsg->status_code );
                                buffer_add( resp_buffer, code );
+                               osrfMessageFree(omsg);
                        }
                }