return to first page linux journal archive
keywordscontents

Listing 6. Unreleased Memory (unfree.c)

#include <stdio.h>
int main(void)
{
   char *ptr;
   ptr = (char *) calloc(5,sizeof(char) * 10);
   /* I forgot to release the memory */
   return(0);
}