cURL / Mailing Lists / curl-users / Single Mail

curl-users

Memory leak problem "still reachable: 288 bytes in 8 blocks."

From: <rajnivanza_at_gmail.com>
Date: Tue, 23 Dec 2008 15:54:52 +0530

hi guys,

i have written simple program for testing curl example.
but its display some memory leak errors.
if u anybody know this problem solution reply me.
its display "*still reachable: 288 bytes in 8 blocks." error

**program code :* curl.c

#include <curl/curl.h>
int main(void)
{
        CURL *curl;

        curl = curl_easy_init();

        curl_easy_cleanup(curl);

        curl_global_cleanup();

        return 0;
}

*Compile :* gcc curl.c -lcurl -g
*Run :* valgrind --show-reachable=yes --leak-check=full ./a.out
*Output :*
==27282== Memcheck, a memory error detector.
==27282== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==27282== Using LibVEX rev 1658, a library for dynamic binary translation.
==27282== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==27282== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
==27282== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==27282== For more details, rerun with: -v
==27282==
==27282==
==27282== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 37 from 1)
==27282== malloc/free: in use at exit: 288 bytes in 8 blocks.
==27282== malloc/free: 1,870 allocs, 1,862 frees, 74,598 bytes allocated.
==27282== For counts of detected errors, rerun with: -v
==27282== searching for pointers to 8 not-freed blocks.
==27282== checked 485,212 bytes.
==27282==
==27282== 288 bytes in 8 blocks are still reachable in loss record 1 of 1
==27282== at 0x40053C0: malloc (vg_replace_malloc.c:149)
==27282== by 0x7DF6C5D: (within /lib/libcrypto.so.0.9.8b)
==27282== by 0x7DF72DE: CRYPTO_malloc (in /lib/libcrypto.so.0.9.8b)
==27282== by 0x7E3A640: ENGINE_new (in /lib/libcrypto.so.0.9.8b)
==27282== by 0x7E3E5AB: ENGINE_load_dynamic (in /lib/libcrypto.so.0.9.8b)
==27282== by 0x7E3CB46: ENGINE_load_builtin_engines (in
/lib/libcrypto.so.0.9.8b)
==27282== by 0x4047EC6: Curl_ossl_init (in
/usr/local/lib/libcurl.so.4.1.1)
==27282== by 0x405A67B: Curl_ssl_init (in
/usr/local/lib/libcurl.so.4.1.1)
==27282== by 0x4051592: curl_global_init (in
/usr/local/lib/libcurl.so.4.1.1)
==27282== by 0x40515D7: curl_easy_init (in
/usr/local/lib/libcurl.so.4.1.1)
==27282== by 0x80484D9: main (curl.c:7)
==27282==
==27282== LEAK SUMMARY:
==27282== definitely lost: 0 bytes in 0 blocks.
==27282== possibly lost: 0 bytes in 0 blocks.
==27282== *still reachable: 288 bytes in 8 blocks.*
==27282== suppressed: 0 bytes in 0 blocks.

Thanks and Regards
Rajnikant Vanza

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-12-23