Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • U uboot-imx
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • Librem5
  • uboot-imx
  • Repository
Switch branch/tag
  • uboot-imx
  • drivers
  • usb
  • gadget
  • g_dnl.c
Find file BlameHistoryPermalink
  • Stephen Warren's avatar
    usb: gadget: don't leak configs when unbinding · 44bfb43f
    Stephen Warren authored Sep 04, 2015
    
    
    By the time g_dnl_unbind() is run, cdev->config has been set to NULL,
    so the free() there does nothing, and the config struct is leaked.
    Equally, struct usb_gadget contains a linked list of config structs, so
    the code should iterate over them all and free each one, rather than
    freeing one particular config struct.
    
    composite_unbind() already iterates over the list of config structs, and
    unlinks each from the linked list. Fix this loop to free() each struct as
    it's unlinked and otherwise forgotten.
    
    Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
    Acked-by: default avatarLukasz Majewski <l.majewski@samsung.com>
    Tested-by: default avatarLukasz Majewski <l.majewski@samsung.com>
    44bfb43f