Why does the following program leak memory?

closed account (1yR4jE8b)
1
2
3
4
5
6
#include <glib.h>

int main()
{
	return 0;
}


When I run this program through valgrind, I get:


==7846== Memcheck, a memory error detector
==7846== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==7846== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for copyright info
==7846== Command: ./a.out
==7846==
==7846==
==7846== HEAP SUMMARY:
==7846==     in use at exit: 120 bytes in 1 blocks
==7846==   total heap usage: 2 allocs, 1 frees, 688 bytes allocated
==7846==
==7846== LEAK SUMMARY:
==7846==    definitely lost: 120 bytes in 1 blocks
==7846==    indirectly lost: 0 bytes in 0 blocks
==7846==      possibly lost: 0 bytes in 0 blocks
==7846==    still reachable: 0 bytes in 0 blocks
==7846==         suppressed: 0 bytes in 0 blocks
==7846== Rerun with --leak-check=full to see details of leaked memory
==7846==
==7846== For counts of detected and suppressed errors, rerun with: -v
==7846== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)


??
closed account (S6k9GNh0)
Does it do that if you don't include glib.h?
Ooooh... I think someone found a bug in glibc..?
Topic archived. No new replies allowed.