From 8eac31baffd43518a9ad37eda474b439b1020f39 Mon Sep 17 00:00:00 2001 From: Demi Marie Obenour Date: Sat, 2 Aug 2025 13:33:16 -0400 Subject: [PATCH] stream: add missing out of memory check The return value of calloc() was not checked for NULL. --- src/pipewire/stream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 530382fac..32cca2b26 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -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;