Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

irmap: duplicate string in irmap_scan_path_add #2415

Closed
wants to merge 1 commit into from

Conversation

liusdu
Copy link

@liusdu liusdu commented May 30, 2024

Duplicate string in irmap_scan_path_add, otherwise it will free before parsing next configuration input.

Duplicate string in irmap_scan_path_add, otherwise it will free before
parsing next configuration input.

Signed-off-by: Liu Hua <weldonliu@tencent.com>
Copy link

A friendly reminder that this PR had no activity for 30 days.

@@ -500,7 +500,7 @@ int irmap_scan_path_add(char *path)
return -1;
}

o->ir->path = path;
o->ir->path = strdup(path);
Copy link
Member

Choose a reason for hiding this comment

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

strdup can return NULL and we need to handle this case.

@avagin
Copy link
Member

avagin commented Jul 2, 2024

Merged: fac8d64

@avagin avagin closed this Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants