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

Fix incorrect free in conn_sock #476

Merged
merged 1 commit into from
Dec 15, 2023
Merged

Conversation

martinetd
Copy link
Contributor

Earlier commit freed socket_parent_dir()'s result which is correct in the case it returns a path from g_build_filename, but when it returns opt_bundle_path the string should not be freed.

Make the function always return an allocated string that can be freed

Fixes: #475
Fixes: fad6bac ("fix some issues flagged by SAST scan")

Earlier commit freed socket_parent_dir()'s result which is correct in
the case it returns a path from g_build_filename, but when it returns
opt_bundle_path the string should not be freed.

Make the function always return an allocated string that can be freed

Fixes: containers#475
Fixes: fad6bac ("fix some issues flagged by SAST scan")
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
@martinetd
Copy link
Contributor Author

(alternatively we could only free parent_dir if (!use_full_attach_path) in bind_unix_socket, but that seems more error-prone)

@Luap99
Copy link
Member

Luap99 commented Dec 15, 2023

@haircommander @giuseppe PTAL

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@giuseppe giuseppe merged commit 53531ac into containers:main Dec 15, 2023
16 checks passed
hswong3i added a commit to alvistack/containers-conmon that referenced this pull request Dec 16, 2023
    git clean -xdf
    tar zcvf ../conmon_2.1.9+20231216.331c602d.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp conmon.spec ../conmon_2.1.9+20231216.331c602d-1.spec
    cp ../conmon*2.1.9+20231216.331c602d*.{gz,xz,spec,dsc} /osc/home\:alvistack/containers-conmon-2.1.9+20231216.331c602d/
    rm -rf ../conmon*2.1.9+20231216.331c602d*.*

See containers#476

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
pld-gitsync pushed a commit to pld-linux/conmon that referenced this pull request Dec 16, 2023
amarshall added a commit to amarshall/nixpkgs that referenced this pull request Dec 16, 2023
hamburger1984 pushed a commit to hamburger1984/nixpkgs that referenced this pull request Dec 18, 2023
vncsb pushed a commit to vncsb/nixpkgs that referenced this pull request Dec 19, 2023
Lainera pushed a commit to Lainera/nixpkgs that referenced this pull request Dec 20, 2023
adelton added a commit to adelton/freeipa-container that referenced this pull request Jan 3, 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.

conmon 2.1.9 not working with podman 4.8.2 and ubuntu 22.04
3 participants