mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
hidpp20: squash memory leak on profile initialization error
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Benjamin Tissoires
parent
2faa94920e
commit
586fc7a97d
@@ -1624,8 +1624,10 @@ hidpp20_onboard_profiles_allocate(struct hidpp20_device *device,
|
||||
0x00,
|
||||
offset,
|
||||
data + offset);
|
||||
if (rc < 0)
|
||||
if (rc < 0) {
|
||||
hidpp20_onboard_profiles_destroy(profiles);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < profiles->num_profiles; i++) {
|
||||
|
||||
Reference in New Issue
Block a user