Problems with memory leaks and uninitialized values

Thanks for suggestions.
I’m using intel GMA950, sound unknown:). Compiler g++ 4.1.0. Fedora Core.
Here is a source.
int main()
{
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Quit();
}

If it inits video only, it will cause one error.

Here is a text from valgrind.
==7133== Memcheck, a memory error detector.
==7133== Copyright © 2002-2005, and GNU GPL’d, by Julian Seward et al.
==7133== Using LibVEX rev 1471, a library for dynamic binary translation.
==7133== Copyright © 2004-2005, and GNU GPL’d, by OpenWorks LLP.
==7133== Using valgrind-3.1.0, a dynamic binary instrumentation framework.
==7133== Copyright © 2000-2005, and GNU GPL’d, by Julian Seward et al.
==7133== For more details, rerun with: -v
==7133==
==7133== Syscall param write(buf) points to uninitialised byte(s)
==7133== at 0xCCA2D3: __write_nocancel (in /lib/libc-2.4.so)
==7133== by 0x414D4EE: _X11TransWrite (in /usr/lib/libX11.so.6.2.0)
==7133== by 0x4153406: (within /usr/lib/libX11.so.6.2.0)
==7133== by 0x415350A: _XReply (in /usr/lib/libX11.so.6.2.0)
==7133== by 0x4139341: XInternAtom (in /usr/lib/libX11.so.6.2.0)
==7133== by 0x40609B7: (within /usr/lib/libSDL-1.2.so.0.7.2)
==7133== by 0x40617A7: (within /usr/lib/libSDL-1.2.so.0.7.2)
==7133== by 0x4054DED: SDL_VideoInit (in /usr/lib/libSDL-1.2.so.0.7.2)
==7133== by 0x40284E0: SDL_InitSubSystem (in /usr/lib/libSDL-1.2.so.0.7.2)
==7133== by 0x4028526: SDL_Init (in /usr/lib/libSDL-1.2.so.0.7.2)
==7133== by 0x80486E2: main (in /home/easy/Desktop/cpp/main)
==7133== Address 0x4294F16 is 14 bytes inside a block of size 16,384 alloc’d
==7133== at 0x40045EB: calloc (vg_replace_malloc.c:279)
==7133== by 0x413E186: XOpenDisplay (in /usr/lib/libX11.so.6.2.0)
==7133== by 0x40615F7: (within /usr/lib/libSDL-1.2.so.0.7.2)
==7133== by 0x4054DED: SDL_VideoInit (in /usr/lib/libSDL-1.2.so.0.7.2)
==7133== by 0x40284E0: SDL_InitSubSystem (in /usr/lib/libSDL-1.2.so.0.7.2)
==7133== by 0x4028526: SDL_Init (in /usr/lib/libSDL-1.2.so.0.7.2)
==7133== by 0x80486E2: main (in /home/easy/Desktop/cpp/main)
==7133==
==7133== Syscall param ioctl(arg) contains uninitialised byte(s)
==7133== at 0xCD1C19: ioctl (in /lib/libc-2.4.so)
==7133== by 0x43D1F51: snd_pcm_prepare (in /lib/libasound.so.2.0.0)
==7133== by 0x43D857C: snd_pcm_hw_params (in /lib/libasound.so.2.0.0)
==7133== by 0x4411143: snd_pcm_direct_initialize_slave (in

/lib/libasound.so.2.0.0)
==7133== by 0x440AD4B: snd_pcm_dmix_open (in /lib/libasound.so.2.0.0)
==7133== by 0x440B1D6: _snd_pcm_dmix_open (in /lib/libasound.so.2.0.0)
==7133== by 0x43D79D4: (within /lib/libasound.so.2.0.0)
==7133== by 0x43D80F2: (within /lib/libasound.so.2.0.0)
==7133== by 0x43D8162: snd_pcm_open_slave (in /lib/libasound.so.2.0.0)
==7133== by 0x4414A13: _snd_pcm_softvol_open (in /lib/libasound.so.2.0.0)
==7133== by 0x43D79D4: (within /lib/libasound.so.2.0.0)
==7133== by 0x43D8191: snd_pcm_open_slave (in /lib/libasound.so.2.0.0)
==7133==
==7133== Syscall param ioctl(arg) contains uninitialised byte(s)
==7133== at 0xCD1C19: ioctl (in /lib/libc-2.4.so)
==7133== by 0x43D1E11: snd_pcm_start (in /lib/libasound.so.2.0.0)
==7133== by 0x4411509: snd_pcm_direct_initialize_slave (in

/lib/libasound.so.2.0.0)
==7133== by 0x440AD4B: snd_pcm_dmix_open (in /lib/libasound.so.2.0.0)
==7133== by 0x440B1D6: _snd_pcm_dmix_open (in /lib/libasound.so.2.0.0)
==7133== by 0x43D79D4: (within /lib/libasound.so.2.0.0)
==7133== by 0x43D80F2: (within /lib/libasound.so.2.0.0)
==7133== by 0x43D8162: snd_pcm_open_slave (in /lib/libasound.so.2.0.0)
==7133== by 0x4414A13: _snd_pcm_softvol_open (in /lib/libasound.so.2.0.0)
==7133== by 0x43D79D4: (within /lib/libasound.so.2.0.0)
==7133== by 0x43D8191: snd_pcm_open_slave (in /lib/libasound.so.2.0.0)
==7133== by 0x43F47FF: _snd_pcm_plug_open (in /lib/libasound.so.2.0.0)
==7133==
==7133== Syscall param socketcall.bind(my_addr…sun_path) points to

uninitialised byte(s)
==7133== at 0xCD9FC7: bind (in /lib/libc-2.4.so)
==7133== by 0x4412025: snd_pcm_direct_server_create (in

/lib/libasound.so.2.0.0)
==7133== by 0x440AF51: snd_pcm_dmix_open (in /lib/libasound.so.2.0.0)
==7133== by 0x440B1D6: _snd_pcm_dmix_open (in /lib/libasound.so.2.0.0)
==7133== by 0x43D79D4: (within /lib/libasound.so.2.0.0)
==7133== by 0x43D80F2: (within /lib/libasound.so.2.0.0)
==7133== by 0x43D8162: snd_pcm_open_slave (in /lib/libasound.so.2.0.0)
==7133== by 0x4414A13: _snd_pcm_softvol_open (in /lib/libasound.so.2.0.0)
==7133== by 0x43D79D4: (within /lib/libasound.so.2.0.0)
==7133== by 0x43D8191: snd_pcm_open_slave (in /lib/libasound.so.2.0.0)
==7133== by 0x43F47FF: _snd_pcm_plug_open (in /lib/libasound.so.2.0.0)
==7133== by 0x43D79D4: (within /lib/libasound.so.2.0.0)
==7133== Address 0xBEE12DC7 is on thread 1’s stack
==7135== Warning: ignored attempt to set SIGKILL handler in sigaction();
==7135== the SIGKILL signal is uncatchable
==7134==
==7134== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 49 from 1)
==7134== malloc/free: in use at exit: 173,070 bytes in 4,709 blocks.
==7134== malloc/free: 6,319 allocs, 1,610 frees, 271,837 bytes allocated.
==7134== For counts of detected errors, rerun with: -v
==7134== searching for pointers to 4,709 not-freed blocks.
==7134== checked 895,936 bytes.
==7134==
==7134== LEAK SUMMARY:
==7134== definitely lost: 0 bytes in 0 blocks.
==7134== possibly lost: 30,352 bytes in 844 blocks.
==7134== still reachable: 142,718 bytes in 3,865 blocks.
==7134== suppressed: 0 bytes in 0 blocks.
==7134== Reachable blocks (those to which a pointer was found) are not shown.
==7134== To see them, rerun with: --show-reachable=yes
==7135==
==7135== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 49 from 1)
==7135== malloc/free: in use at exit: 173,070 bytes in 4,709 blocks.
==7135== malloc/free: 6,319 allocs, 1,610 frees, 271,837 bytes allocated.
==7135== For counts of detected errors, rerun with: -v
==7135== searching for pointers to 4,709 not-freed blocks.
==7135== checked 896,088 bytes.
==7135==
==7135== LEAK SUMMARY:
==7135== definitely lost: 0 bytes in 0 blocks.
==7135== possibly lost: 30,352 bytes in 844 blocks.
==7135== still reachable: 142,718 bytes in 3,865 blocks.
==7135== suppressed: 0 bytes in 0 blocks.
==7135== Reachable blocks (those to which a pointer was found) are not shown.
==7135== To see them, rerun with: --show-reachable=yes
==7133==
==7133== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 49 from 1)
==7133== malloc/free: in use at exit: 83,340 bytes in 3,573 blocks.
==7133== malloc/free: 6,532 allocs, 2,959 frees, 282,494 bytes allocated.
==7133== For counts of detected errors, rerun with: -v
==7133== searching for pointers to 3,573 not-freed blocks.
==7133== checked 11,220,256 bytes.
==7133==
==7133== LEAK SUMMARY:
==7133== definitely lost: 112 bytes in 5 blocks.
==7133== possibly lost: 29,048 bytes in 807 blocks.
==7133== still reachable: 54,180 bytes in 2,761 blocks.
==7133== suppressed: 0 bytes in 0 blocks.
==7133== Use --leak-check=full to see details of leaked memory.