handle open_memstream errors

Fixes #2182
This commit is contained in:
Wim Taymans 2022-03-02 11:48:31 +01:00
parent fdaf4613d8
commit 99f9f729ff
21 changed files with 70 additions and 21 deletions

View file

@ -478,7 +478,8 @@ int pw_rtsp_client_send(struct pw_rtsp_client *client,
struct message *msg;
int cseq;
f = open_memstream((char**)&msg, &len);
if ((f = open_memstream((char**)&msg, &len)) == NULL)
return -errno;
fseek(f, sizeof(*msg), SEEK_SET);