lightblue-platform / lightblue-migrator

GNU General Public License v3.0
3 stars 13 forks source link

** CID 113732: Resource leaks (RESOURCE_LEAK) #361

Closed jewzaam closed 8 years ago

jewzaam commented 8 years ago

Reported from coverity: https://scan.coverity.com/projects/lightblue-platform-lightblue

** CID 113732:  Resource leaks  (RESOURCE_LEAK)
/lightblue-migrator/migrator/src/main/java/com/redhat/lightblue/migrator/CleanupThread.java: 132 in com.redhat.lightblue.migrator.CleanupThread.run()()

________________________________________________________________________________________________________
*** CID 113732:  Resource leaks  (RESOURCE_LEAK)
/lightblue-migrator/migrator/src/main/java/com/redhat/lightblue/migrator/CleanupThread.java: 132 in com.redhat.lightblue.migrator.CleanupThread.run()()
126                 Date d = new Date(System.currentTimeMillis() - oldJobThreshold);
127                 cleanupOldJobs(cli, d);
128                 d = new Date(System.currentTimeMillis() - period * 3); // 3 times period=too long
129                 enableStuckJobs(cli, d);
130
131                 LOGGER.debug("Completed");
>>>     CID 113732:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "cli" going out of scope leaks the resource it refers to.
132             }
133         }