From c0b2ea5a88928823295212f2555a2e3d3582feb5 Mon Sep 17 00:00:00 2001 From: Liviu Chircu Date: Thu, 19 Dec 2024 16:33:34 +0200 Subject: [PATCH] script routes: Fix rare edge-case leading to crash (cherry picked from commit 1b57607905c3bbad632fb2a7c7c1e7add9a09197) --- route.c | 1 + 1 file changed, 1 insertion(+) diff --git a/route.c b/route.c index 61fbfffb546..a7c14aa510b 100644 --- a/route.c +++ b/route.c @@ -359,6 +359,7 @@ struct script_route_ref *dup_ref_script_route_in_shm( sizeof(struct script_route_ref) + ref->name.len + 1); if (s_ref==NULL) { LM_ERR("failed to dup script route in shm\n"); + return NULL; } else { memcpy( s_ref, ref, sizeof(struct script_route_ref) + ref->name.len + 1 );