mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 16:25:03 -05:00
[spotify] Fix free of invalid pointer on http request error
Fixes #1643
This commit is contained in:
parent
9b190dcc2e
commit
214ef12cb5
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user