Skip to content

Commit

Permalink
Merge pull request #483 from kubescape/lock
Browse files Browse the repository at this point in the history
add nil check for appProfile in ApplicationProfileCacheImpl
  • Loading branch information
matthyx authored Feb 17, 2025
2 parents 8a11c73 + cb56482 commit e34aa76
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ func (ap *ApplicationProfileCacheImpl) handleUserManagedProfile(appProfile *v1be

// indexContainerCallStacks builds the search index for a container's call stacks and removes them from the profile
func (ap *ApplicationProfileCacheImpl) indexContainerCallStacks(containerID, containerName string, appProfile *v1beta1.ApplicationProfile) {
if appProfile == nil {
logger.L().Warning("ApplicationProfileCacheImpl - application profile is nil",
helpers.String("containerID", containerID),
helpers.String("containerName", containerName))
return
}

// Initialize container index if needed
if !ap.containerCallStacks.Has(containerID) {
ap.containerCallStacks.Set(containerID, &ContainerCallStackIndex{
Expand Down

0 comments on commit e34aa76

Please sign in to comment.