]> git.ozlabs.org Git - petitboot/commitdiff
discover/udev: fix double free on udev_init failures
authorJeremy Kerr <jk@ozlabs.org>
Thu, 17 Apr 2014 03:40:09 +0000 (11:40 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 17 Apr 2014 03:50:39 +0000 (11:50 +0800)
If the udev monitor or enumerate functions fail, we'll call the
udev_unref and udev_monitor_unref functions twice: once in the cleanup
path and once in the talloc destructor.

This change moves all cleanup to the talloc destructor, so we only do
the unrefs once.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

No differences found