Skip to content

Checked versions of memory allocating functions #75

@obiwac

Description

@obiwac

The codebase makes a lot of use of the following pattern, where allocations are just asserted to have succeeded:

char* CLEANUP_STR parent_backing = strdup(val);
assert(parent_backing != NULL);

I could totally have a strdup_checked or maybe strdup_c function (and equivalents for realloc and calloc and malloc etc etc) to not repeat myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions