[Date Prev][Date Next]
openldap and valgrind
I'm having an interesting time running my code through valgrind.
Valgrind tell me this:
==31309== Conditional jump or move depends on uninitialised value(s)
==31309== at 0x4033004: ldap_first_attribute (in /usr/lib/libldap-2.3.so.0.2.15)
==31309== by 0x8053F45: ldap_to_xmlrpc (mod_ldap.c:504)
Line 504 of mod_lda.c is:
attr = ldap_first_attribute(mod_ldap_conn[thread_id], entry, attr_pointer);
Earlier, attr_pointer is declared:
If I set it null at declaration:
BerElement **attr_pointer = NULL;
Valgrind stops complaining, but then the call to ldap_first_attribute()
hangs and never returns.
Is there a way I can make both of these happy?
"Coding in C is like sending a 3 year old to do groceries. You gotta
tell them exactly what you want or you'll end up with a cupboard full of
pop tarts and pancake mix." -- IRC User (http://www.bash.org/?841435)