server: fix panic when listing sandboxes
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
		
							parent
							
								
									56f2b34def
								
							
						
					
					
						commit
						4578cc93d1
					
				
					 2 changed files with 12 additions and 0 deletions
				
			
		|  | @ -179,6 +179,12 @@ func (s *Server) hasSandbox(id string) bool { | |||
| 	return ok | ||||
| } | ||||
| 
 | ||||
| func (s *Server) removeSandbox(id string) { | ||||
| 	s.stateLock.Lock() | ||||
| 	delete(s.state.sandboxes, id) | ||||
| 	s.stateLock.Unlock() | ||||
| } | ||||
| 
 | ||||
| func (s *Server) addContainer(c *oci.Container) { | ||||
| 	s.stateLock.Lock() | ||||
| 	sandbox := s.state.sandboxes[c.Sandbox()] | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue