mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-18 20:15:14 +02:00
11 lines
225 B
C
11 lines
225 B
C
|
|
#include <stdlib.h>
|
||
|
|
|
||
|
|
/* malloc followed by free — clean.
|
||
|
|
Tests the memory resource pair.
|
||
|
|
Expected: NO state- findings. */
|
||
|
|
void malloc_free_clean(void) {
|
||
|
|
void *p = malloc(100);
|
||
|
|
*(char *)p = 'x';
|
||
|
|
free(p);
|
||
|
|
}
|