Here is the example

Code:
int main()
{
char *buffer1;
char *buffer2;
buffer1 = (char *)malloc(5*sizeof(char));
buffer2 = (char *)malloc(5*sizeof(char));
buffer1 = buffer2; // This will lead Memory leak
.
.
.
.
}