• spiiroin's avatar
    [trigger] Fix resource leaks · 4a8d5988
    spiiroin authored
    Looks like trigger_udev_sysname variable stays valid only because
    udev_device_new_from_syspath() return value is leaked in trigger_init().
    
    Take a copy of udev_device_get_sysname() return value instead on relying on
    borrowed string pointer staying valid.
    
    Remove all mid-function returns, release unneeded resources on success, and
    all acquired resources in case of failure.
    
    Having a boolean function return false on success / true on failure is
    a bit confusing, so rectify that while at it.
    Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
    4a8d5988
Name
Last commit
Last update
config Loading commit data...
debian Loading commit data...
docs Loading commit data...
openembedded Loading commit data...
rpm Loading commit data...
scripts Loading commit data...
src Loading commit data...
systemd Loading commit data...
utils Loading commit data...
.depend Loading commit data...
Copyright Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
Makefile.custom Loading commit data...
README.md Loading commit data...
TODO Loading commit data...
autogen.sh Loading commit data...
config-static.h Loading commit data...
configure.ac Loading commit data...
depend_filter.py Loading commit data...
usb-moded.ini Loading commit data...
usb_moded.pc.in Loading commit data...