[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: commit: ldap/libraries/librewrite rewrite-int.h



Hallvard B Furuseth wrote:
hyc@OpenLDAP.org wrote:
	rewrite-int.h  1.24 -> 1.25
ITS#6005 librewrite must use the same mem allocators as slapd

If you are killing C free/mallocs, here are some others from 'nm *.o' to look at. I don't have time at the moment. Hopefully most are malloced/freed by the same code, not passed to/from ber memory.

In general I'm only concerned with code that is linked into slapd. More specifically, code that allocates memory that other parts of slapd might try to manipulate/free.


clients/tools/common.o:         free malloc
clients/tools/ldapcompare.o:    free malloc
clients/tools/ldappasswd.o:     free
clients/tools/ldapsearch.o:     free malloc        realloc
clients/tools/ldapurl.o:        free               realloc

Ignoring all of those.

libraries/liblber/memory.o: free malloc calloc realloc

Obviously those have to remain.

libraries/libldap/test.o:       free malloc calloc realloc
libraries/libldap_r/test.o:     free malloc calloc realloc

Tests don't matter.

libraries/liblunicode/ure.o:    free malloc calloc realloc
libraries/liblutil/meter.o:     free        calloc
libraries/liblutil/passwd.o:    free
libraries/liblutil/sha1.o:           malloc
libraries/librewrite/rewrite.o: free

Might have to look at those...

servers/slapd/alock.o: free calloc

Self-contained, the memory is never freed by anything else. But for consistency should probably use ch_* instead.


servers/slapd/sl_malloc.o: realloc

It's code that never executes, but should be fixed anyway...

tests/progs/slapd-addel.o:           malloc calloc realloc
tests/progs/slapd-bind.o:       free               realloc
tests/progs/slapd-read.o:       free malloc
tests/progs/slapd-search.o:                        realloc
tests/progs/slapd-tester.o:          malloc calloc

Don't matter.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/