stream: add missing out of memory check

The return value of calloc() was not checked for NULL.
This commit is contained in:
Demi Marie Obenour 2025-08-02 13:33:16 -04:00
parent babcf6d118
commit 8eac31baff

View file

@ -1256,6 +1256,8 @@ static int node_event_param(void *object, int seq,
return 0;
c = calloc(1, sizeof(*c) + SPA_POD_SIZE(param));
if (c == NULL)
return -ENOMEM;
c->info = SPA_PTROFF(c, sizeof(*c), struct spa_pod);
memcpy(c->info, param, SPA_POD_SIZE(param));
c->control.n_values = 0;