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

Generalise zqueue to non-string data pointers, fix memory leaks #806

Merged
merged 1 commit into from Mar 4, 2024

Commits on Mar 3, 2024

  1. Generalise zqueue to non-string data pointers, fix memory leaks

    Make zqueue store a void * instead of a char *.
    
    Remove internal strdup of data ptr in push_back; instead, take ownership
    of the pointer and move the strdup to the callsite in ztee.
    
    This also fixes a one-off memory leak in ztee where first_line was never
    freed after getting pushed onto the queue.
    
    While here, fix memory leaks in the unused get_front and get_back
    functions.
    droe committed Mar 3, 2024
    Copy the full SHA
    d4b40a9 View commit details
    Browse the repository at this point in the history