Unnamed
public text v1 · immutable#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
void cleanup (int status, void *to_free, ...)
{
printf ("%x\n", to_free);
va_list ap;
va_start (ap, to_free);
while (to_free)
free (to_free);
va_end (ap);
exit (status);
}
int main (int argc, char *argv [])
{
int *i;
i = (int *) malloc (10);
printf ("%x\n", i);
cleanup (EXIT_SUCCESS, i);
return 0;
}