From d69a2ec5bad157dfd96d145b984e360fd4835931 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 4 Oct 2017 20:15:38 +1000 Subject: [PATCH] hidpp10: use _cleanup_ for a profile Signed-off-by: Peter Hutterer --- src/driver-hidpp10.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/driver-hidpp10.c b/src/driver-hidpp10.c index 0271c72e..21acde15 100644 --- a/src/driver-hidpp10.c +++ b/src/driver-hidpp10.c @@ -615,12 +615,11 @@ hidpp10drv_probe(struct ratbag_device *device) if (hidpp10drv_fill_from_profile(device, dev)) { /* Fall back to something that every mouse has */ - struct ratbag_profile *profile; + _cleanup_profile_ struct ratbag_profile *profile; ratbag_device_init_profiles(device, 1, 1, 3, 0); profile = ratbag_device_get_profile(device, 0); profile->is_active = true; - ratbag_profile_unref(profile); } return 0;