linux-usb-gadgets / libusbgx

C library encapsulating the Linux kernel USB gadget configfs userspace API functionality
GNU General Public License v2.0
216 stars 72 forks source link

Fix: Memory leak config label #81

Closed jeffrey-afk closed 1 year ago

jeffrey-afk commented 1 year ago

Noticed a minor memory leak of the config label, detected when a second gadget was created.

{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   match-leak-kinds: definite
   fun:malloc
   fun:strndup
   fun:usbg_split_config_label_id
   fun:usbg_parse_config
   fun:usbg_parse_configs
   fun:usbg_parse_gadget
   fun:usbg_parse_gadgets
   fun:usbg_parse_state
   fun:usbg_init
   fun:create_usbg
   fun:main
}