From 1beed8c359b361db4bc603b18dcf4619d8d49053 Mon Sep 17 00:00:00 2001 From: Harnish Patel Date: Mon, 11 Aug 2025 16:06:24 -0700 Subject: [PATCH] RDKB-60813 : jst crash fix Reason for change: jst crash fix Test Procedure: As per ticket Risks: Medium Priority: P0 Signed-off-by: Harnish_Patel@comcast.com Change-Id: I109a372871f9fb28c763d5923e334c440c3c10dd (cherry picked from commit 3a5406eb14d164ee2ea14ed1ab70a76019e00ec7) --- source/jst_post.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/jst_post.c b/source/jst_post.c index 8383dde..8a0ec77 100644 --- a/source/jst_post.c +++ b/source/jst_post.c @@ -962,7 +962,9 @@ duk_ret_t ccsp_post_module_open(duk_context *ctx) { process_multipart_form_data(content_data, content_len, boundary, boundary_len); free(boundary); - free(content_data); + if (post_data == NULL || post_data != content_data) { + free(content_data); + } } else {