Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
mock-free.c File Reference

(/usr/bin/git 2025-08-01, commit: e46fc091)

Implementation of a mock function for free(). More...

#include "mock-free.h"
#include <stdlib.h>
#include "unit_test.h"
Include dependency graph for mock-free.c:

Functions

void __wrap_free (void *ptr)
 

Variables

bool crinitMockFreeEnabled = false
 

Detailed Description

Implementation of a mock function for free().

Function Documentation

◆ __wrap_free()

void __wrap_free ( void *  ptr)

Mock function for free().

If crinitMockFreeEnabled is true then it checks that the right parameters are given. If crinitMockFreeEnabled is false then the call is forwarded to the genuine free method.

Variable Documentation

◆ crinitMockFreeEnabled

bool crinitMockFreeEnabled = false