1
0
Fork 0
mirror of https://github.com/tuxedocomputers/tuxedo-touchpad-switch.git synced 2025-01-18 11:41:10 +01:00

Fix memory leak

This commit is contained in:
Werner Sembach 2022-03-04 13:09:03 +01:00
parent e7f295d357
commit c5b13b82b7

View file

@ -182,11 +182,13 @@ int setup_kde(int lockfile_arg) {
while (g_variant_iter_loop(iter, "s", &str)) {
if (strcmp(str, "kded_touchpad") == 0) {
object_path = "/modules/kded_touchpad";
break; // break is fine here, we dont need to free unpacked strings
g_free(str); // g_variant_iter_loop needs freeing when break is used
break;
}
if (strcmp(str, "touchpad") == 0) {
object_path = "/modules/touchpad";
break; // break is fine here, we dont need to free unpacked strings
g_free(str); // g_variant_iter_loop needs freeing when break is used
break;
}
}