mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-17 06:11:36 +00:00
Fix a few chrashes is libgamestream
This commit is contained in:
@@ -130,6 +130,10 @@ static int load_cert(const char* keyDirectory) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int load_server_status(const char *address, PSERVER_DATA server) {
|
static int load_server_status(const char *address, PSERVER_DATA server) {
|
||||||
|
char *pairedText = NULL;
|
||||||
|
char *currentGameText = NULL;
|
||||||
|
char *versionText = NULL;
|
||||||
|
|
||||||
int ret = GS_INVALID;
|
int ret = GS_INVALID;
|
||||||
char url[4096];
|
char url[4096];
|
||||||
sprintf(url, "https://%s:47984/serverinfo?uniqueid=%s", address, unique_id);
|
sprintf(url, "https://%s:47984/serverinfo?uniqueid=%s", address, unique_id);
|
||||||
@@ -144,9 +148,6 @@ static int load_server_status(const char *address, PSERVER_DATA server) {
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *pairedText = NULL;
|
|
||||||
char *currentGameText = NULL;
|
|
||||||
char *versionText = NULL;
|
|
||||||
if (xml_search(data->memory, data->size, "currentgame", ¤tGameText) != GS_OK) {
|
if (xml_search(data->memory, data->size, "currentgame", ¤tGameText) != GS_OK) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,8 +113,9 @@ PHTTP_DATA http_create_data() {
|
|||||||
|
|
||||||
void http_free_data(PHTTP_DATA data) {
|
void http_free_data(PHTTP_DATA data) {
|
||||||
if (data != NULL) {
|
if (data != NULL) {
|
||||||
free(data);
|
|
||||||
if (data->memory != NULL)
|
if (data->memory != NULL)
|
||||||
free(data->memory);
|
free(data->memory);
|
||||||
|
|
||||||
|
free(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user