Skip to content

tool_getparam: use memdup0() instead of malloc + copy#20118

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/tool-memdup
Closed

tool_getparam: use memdup0() instead of malloc + copy#20118
bagder wants to merge 1 commit into
masterfrom
bagder/tool-memdup

Conversation

@bagder

@bagder bagder commented Dec 30, 2025

Copy link
Copy Markdown
Member

No description provided.

@bagder
bagder marked this pull request as ready for review December 30, 2025 22:19
@bagder
bagder requested a review from Copilot December 30, 2025 22:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the getstrn() function in tool_getparam.c to use the existing memdup0() helper function instead of manually allocating memory, copying data, and null-terminating the string.

  • Replaced manual memory allocation and string copying with memdup0() call
  • Added include for tool_strdup.h to access the memdup0() function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@testclutch

Copy link
Copy Markdown

Analysis of PR #20118 at 01f5b01a:

Test ../../tests/http/test_16_info.py::TestInfo::test_16_04_info_http_download[http/1.1] failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 2 different CI jobs (the link just goes to one of them).

Generated by Testclutch

@bagder bagder closed this in 37d871a Dec 30, 2025
@bagder
bagder deleted the bagder/tool-memdup branch December 30, 2025 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants