Selaa lähdekoodia

lib: release acquired bus reference

On each gamemode_request call a new connection to d-bus is opened
but the reference was never release thus leaking the connection
and associated memory.
Christian Kellner 5 vuotta sitten
vanhempi
sitoutus
393a5e8f41
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      lib/client_impl.c

+ 1 - 0
lib/client_impl.c

@@ -92,6 +92,7 @@ static int gamemode_request(const char *function, int arg)
 				         strerror(-ret));
 			}
 		}
+		sd_bus_unref(bus);
 	}
 
 	return result;