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

@ -202,7 +202,11 @@ int main(int argc, char *argv[])
}
f = open_memstream(&args, &size);
if ((f = open_memstream(&args, &size)) == NULL) {
fprintf(stderr, "can't open memstream: %m\n");
goto exit;
}
fprintf(f, "{");
if (opt_remote != NULL)