[openrtm-staff:745] Fwd: New Defects reported by Coverity Scan for OpenRTM-aist-Java
Ando Noriaki
noriaki.ando @ gmail.com
2017年 7月 13日 (木) 12:58:29 JST
片見様
安藤です
Coverity Scanにて指摘された以下の問題について、調査および修正をお願いいたします。
---------- Forwarded message ----------
From: <scan-admin @ coverity.com>
Date: 2017-06-26 11:41 GMT+09:00
Subject: New Defects reported by Coverity Scan for OpenRTM-aist-Java
To: noriaki.ando @ gmail.com
Hi,
Please find the latest report on new defect(s) introduced to
OpenRTM-aist-Java found with Coverity Scan.
2 new defect(s) introduced to OpenRTM-aist-Java found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 1382979: Resource leaks (RESOURCE_LEAK)
/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/SharedMemory.java: 218 in
jp.go.aist.rtm.RTC.port.SharedMemory.open_memory(long, java.lang.String)()
____________________________________________________________
____________________________________________
*** CID 1382979: Resource leaks (RESOURCE_LEAK)
/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/SharedMemory.java: 218 in
jp.go.aist.rtm.RTC.port.SharedMemory.open_memory(long, java.lang.String)()
212 }
213 else {
214 address = SHARED_NAME+m_shm_address;
215 try{
216 RandomAccessFile file = new
RandomAccessFile(address, "rw");
217 file.setLength(m_memory_size);
>>> CID 1382979: Resource leaks (RESOURCE_LEAK)
>>> Variable "file" going out of scope leaks the resource it refers to.
218 }
219 catch(Exception ex) {
220 rtcout.println(Logbuf.ERROR,"Open error
"+ex.toString() );
221 }
222 }
223 /*
** CID 1382969: Resource leaks (RESOURCE_LEAK)
/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/SharedMemory.java: 149 in
jp.go.aist.rtm.RTC.port.SharedMemory.create_memory(long, java.lang.String)()
____________________________________________________________
____________________________________________
*** CID 1382969: Resource leaks (RESOURCE_LEAK)
/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/SharedMemory.java: 149 in
jp.go.aist.rtm.RTC.port.SharedMemory.create_memory(long, java.lang.String)()
143 }
144 else {
145 address = SHARED_NAME+m_shm_address;
146 try{
147 RandomAccessFile file = new
RandomAccessFile(address, "rw");
148 file.setLength(m_memory_size);
>>> CID 1382969: Resource leaks (RESOURCE_LEAK)
>>> Variable "file" going out of scope leaks the resource it refers to.
149 }
150 catch(Exception ex) {
151 rtcout.println(Logbuf.ERROR,"Open error
"+ex.toString() );
152 }
153 }
154 /*
____________________________________________________________
____________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.
net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-
2Bd2MGckcRZdqEYIEV6fC3VpHsiJuUgyNAsW5JUGLodde5X6QuvUplY3hTfv
UVMk8BogSX8Dcv8-3D_bMTJc4H827k1LecmShShQChJHyy-2FlGNA-2BiTt-2FUh6eI3fmn-2B-
2BeYK-2BW3QyzAyyUDJjOGmW0X2K0UcTi-2B-2BuB0EaQuYs3J9KFDu7civnNp3v-
2BkqnDjRi72CkMvjGIDnuww0WXKMAFprlOK261V282JBLiNq6PcOKG5Pss2N6q-
2FKq7frEKAJPwykdVcNtvdhdspXSF22Lb6KDc537Hfw52kYNFizA0Radz5Bx-2Fi2F9SNdsGs-3D
To manage Coverity Scan email notifications for "noriaki.ando @ gmail.com",
click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-
2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-
2FA8y06Nq4nZ7NaPR9DYpBKeHDWilWxB-2BYSE-2FoLBRpTZIxrjsAsU7h3e2ii2p6-
2BxblUHLQUv-2FpHkkxZRrxd95hsDXZCRW0Q95LNj-2BneKI-2B17tghd35qxk-3D_
bMTJc4H827k1LecmShShQChJHyy-2FlGNA-2BiTt-2FUh6eI3fmn-2B-2BeYK-
2BW3QyzAyyUDJj2BPSNC5aZQu6zXOv0-2FwsiGTC8qXyYTT7ZfUUffzPRBgLLT
XkKT-2F2RoQ0LEuWO-2BBRyy-2BxKfBUh1OgcmBoeN2fdxEEpI1jmRFg-
2FXNeb8ds1GcjawAKvd2DcYeYQVSAVBfrzFNbWHksN3AUJTuFK1zGWHqwqOi
vwaO0MmChLBZ121c-3D
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://www.openrtm.org/pipermail/openrtm-staff/attachments/20170713/243c0609/attachment.html>
More information about the openrtm-staff
mailing list