[spotify] Fix free of invalid pointer on http request error

Fixes #1643
This commit is contained in:
ejurgensen 2023-08-29 20:14:19 +02:00
parent 9b190dcc2e
commit 214ef12cb5
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
#include <pthread.h>
#define LIBRESPOT_C_VERSION_MAJOR 0
#define LIBRESPOT_C_VERSION_MINOR 1
#define LIBRESPOT_C_VERSION_MINOR 2
struct sp_session;

View File

@ -193,7 +193,7 @@ file_select(uint8_t *out, size_t out_len, Track *track, enum sp_bitrates bitrate
static int
ap_resolve(char **address, unsigned short *port, const char *avoid)
{
char *body;
char *body = NULL;
json_object *jresponse = NULL;
json_object *ap_list;
json_object *ap;

View File

@ -231,7 +231,7 @@ https_get_cb(char **out, const char *url)
ret = http_client_request(&ctx, NULL);
if (ret < 0 || ctx.response_code != HTTP_OK)
{
DPRINTF(E_LOG, L_SPOTIFY, "Failed to AP list from '%s' (return %d, error code %d)\n", ctx.url, ret, ctx.response_code);
DPRINTF(E_LOG, L_SPOTIFY, "Failed to get AP list from '%s' (return %d, error code %d)\n", ctx.url, ret, ctx.response_code);
goto error;
}