Patch from Scott McKellar to plug a memory leak in the mathbench test application
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 31 Jan 2008 19:32:04 +0000 (19:32 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 31 Jan 2008 19:32:04 +0000 (19:32 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1242 9efc2488-bf62-4759-914b-345cdb29e865

src/c-apps/osrf_dbmath.c

index 41ace40..bb0c093 100644 (file)
@@ -73,6 +73,10 @@ int osrfMathRun( osrfMethodContext* ctx ) {
                        free(a); free(b);
                        return 0;
                }
+               else {
+                       if(a) free(a);
+                       if(b) free(b);
+               }
        }
 
        return -1;