Fix resources leak reported by coverity
For unique_ptr, release only set the ownership to null, but don't free the resource behind. On the other hand, reset do. Closes Coverity ID 483269 Closes Coverity ID 471974 Closes Coverity ID 471973
This commit is contained in:
parent
c76c4ba304
commit
13c647ef6f
|
@ -62,7 +62,7 @@ void FP_LIB_TABLE_ROW::SetType( const wxString& aType )
|
|||
if( PCB_IO_MGR::PCB_FILE_T( -1 ) == type )
|
||||
type = PCB_IO_MGR::KICAD_SEXP;
|
||||
|
||||
plugin.release();
|
||||
plugin.reset();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -344,7 +344,7 @@ void SCH_IO_HTTP_LIB::connect()
|
|||
m_lastError = m_conn->GetLastError();
|
||||
|
||||
// Make sure we release pointer so we are able to query API again next time
|
||||
m_conn.release();
|
||||
m_conn.reset();
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ void SYMBOL_LIB_TABLE_ROW::SetType( const wxString& aType )
|
|||
if( type == SCH_IO_MGR::SCH_FILE_UNKNOWN )
|
||||
type = SCH_IO_MGR::SCH_KICAD;
|
||||
|
||||
plugin.release();
|
||||
plugin.reset();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue