浏览代码

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 年之前
父节点
当前提交
393a5e8f41
共有 1 个文件被更改,包括 1 次插入0 次删除
  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;