Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion source/jst_post.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Comment on lines +965 to +967

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new if block uses tab indentation and a brace/indent style that doesn’t match the surrounding file (which appears to use consistent 2-space indentation). Please reformat these lines to match local style for readability and diff hygiene.

Suggested change
if (post_data == NULL || post_data != content_data) {
free(content_data);
}
if (post_data == NULL || post_data != content_data) {
free(content_data);
}

Copilot uses AI. Check for mistakes.
Comment on lines +965 to +967

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (post_data == NULL || post_data != content_data) is logically equivalent to post_data != content_data here because content_data is non-NULL on this path. Simplifying the condition would improve readability and reduce redundant checks.

Suggested change
if (post_data == NULL || post_data != content_data) {
free(content_data);
}
if (post_data != content_data) {
free(content_data);
}

Copilot uses AI. Check for mistakes.
}
else
{
Expand Down
Loading