Listing 1 Cleaning up after a TRY

char *volatile p[10];
volatile int i=0;
int out_of_memory;

TRY(
{
  while (i<10)
  {
    p[i] = malloc(1024);
    if (p[i] == NULL)
      THROW(out_of_memory);
    i++;
 }
},
{
  while (i--> 0) free(p[i]);
}
  );
/* End of File */