Memory leak somewhere at PQconnectdb?

From: Antonio Vieiro <antonio(at)antonioshome(dot)net>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Memory leak somewhere at PQconnectdb?
Date: 2011-09-01 14:08:09
Message-ID: CAPHN3JW+O07KVPVtrKYNjJQRy8xjZ9nffmAxFkpm43EvcyRyjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I'm running one of my programs with valgrind to check for memory leaks
and I'm seeing something like this:

==13207== 4 bytes in 1 blocks are still reachable in loss record 1 of 256
==13207== at 0x4026864: malloc (vg_replace_malloc.c:236)
==13207== by 0x43343BD: ??? (in /lib/libcrypto.so.0.9.8)
==13207== by 0x4334A6B: CRYPTO_malloc (in /lib/libcrypto.so.0.9.8)
==13207== by 0x438D199: engine_cleanup_add_last (in /lib/libcrypto.so.0.9.8)
==13207== by 0x438DA19: ENGINE_add (in /lib/libcrypto.so.0.9.8)
==13207== by 0x4393712: ENGINE_load_padlock (in /lib/libcrypto.so.0.9.8)
==13207== by 0x438FCCB: ENGINE_load_builtin_engines (in
/lib/libcrypto.so.0.9.8)
==13207== by 0x43F32B9: OPENSSL_config (in /lib/libcrypto.so.0.9.8)
==13207== by 0x407E80B: ??? (in /usr/lib/libpq.so.5.2)
==13207== by 0x406FA85: PQconnectPoll (in /usr/lib/libpq.so.5.2)
==13207== by 0x407019A: ??? (in /usr/lib/libpq.so.5.2)
==13207== by 0x4071952: PQconnectdb (in /usr/lib/libpq.so.5.2)

and

==13207== 8 bytes in 1 blocks are still reachable in loss record 2 of 256
==13207== at 0x4026864: malloc (vg_replace_malloc.c:236)
==13207== by 0x43343BD: ??? (in /lib/libcrypto.so.0.9.8)
==13207== by 0x4334A6B: CRYPTO_malloc (in /lib/libcrypto.so.0.9.8)
==13207== by 0x4393D98: BUF_strndup (in /lib/libcrypto.so.0.9.8)
==13207== by 0x4393E33: BUF_strdup (in /lib/libcrypto.so.0.9.8)
==13207== by 0x43F2E47: CONF_module_add (in /lib/libcrypto.so.0.9.8)
==13207== by 0x43918A3: ENGINE_add_conf_module (in /lib/libcrypto.so.0.9.8)
==13207== by 0x43F326B: OPENSSL_load_builtin_modules (in
/lib/libcrypto.so.0.9.8)
==13207== by 0x43F32B4: OPENSSL_config (in /lib/libcrypto.so.0.9.8)
==13207== by 0x407E80B: ??? (in /usr/lib/libpq.so.5.2)
==13207== by 0x406FA85: PQconnectPoll (in /usr/lib/libpq.so.5.2)
==13207== by 0x407019A: ??? (in /usr/lib/libpq.so.5.2)

I'm using PQconnectdb to open connections and PQfinish to finish them.

I was wondering if there're any leaks reported for PQconnectdb, any
other hints would be greatly appreciated.

Thanks in advance,
Antonio

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-09-01 14:13:33 Re: md5 of table
Previous Message Achilleas Mantzios 2011-09-01 13:56:36 Re: md5 of table