~ttx/openldap/lucid-gssapi-495418

« back to all changes in this revision

Viewing changes to servers/slapd/sl_malloc.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek, Updated debconf translations
  • Date: 2009-07-28 10:17:15 UTC
  • mfrom: (1.1.4 upstream) (0.2.2 sid)
  • mto: (0.2.4 sid)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20090728101715-epwmqmsk0d3h22k3
* New upstream version.
  - Fixes FTBFS on ia64 with -fPIE. Closes: #524770.
  - Fixes some TLS issues with GnuTLS.  Closes: #505191.
* Update priority of libldap-2.4-2 to match the archive override.
* Add the missing ldapexop and ldapurl tools to ldap-utils, as well as the
  ldapurl(1) manpage.  Thanks to Peter Marschall for the patch.
  Closes: #496749.
* Bump build-dependency on debhelper to 6 instead of 5, since that's
  what we're using.  Closes: #498116.
* Set the default SLAPD_SERVICES to ldap:/// ldapi:///, instead of using
  the built-in default of ldap:/// only.
* Build-depend on libltdl-dev | libltdl3-dev (>= 1.4.3), for the package
  name change.  Closes: #522965.

[ Updated debconf translations ]
* Spanish, thanks to Francisco Javier Cuadrado <fcocuadrado@gmail.com>.
  Closes: #521804.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* sl_malloc.c - malloc routines using a per-thread slab */
2
 
/* $OpenLDAP: pkg/ldap/servers/slapd/sl_malloc.c,v 1.39.2.6 2008/02/11 23:34:15 quanah Exp $ */
 
2
/* $OpenLDAP: pkg/ldap/servers/slapd/sl_malloc.c,v 1.39.2.9 2009/04/29 01:22:17 quanah Exp $ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
 
 * Copyright 2003-2008 The OpenLDAP Foundation.
 
5
 * Copyright 2003-2009 The OpenLDAP Foundation.
6
6
 * All rights reserved.
7
7
 *
8
8
 * Redistribution and use in source and binary forms, with or without
195
195
                        if (size > (char *)sh->sh_end - (char *)sh->sh_base) {
196
196
                                void    *newptr;
197
197
 
198
 
                                newptr = realloc( sh->sh_base, size );
 
198
                                newptr = ch_realloc( sh->sh_base, size );
199
199
                                if ( newptr == NULL ) return NULL;
200
200
                                sh->sh_base = newptr;
201
201
                        }
267
267
        int i, j;
268
268
 
269
269
#ifdef SLAP_NO_SL_MALLOC
270
 
        return ber_memalloc_x( size, NULL );
 
270
        newptr = ber_memalloc_x( size, NULL );
 
271
        if ( newptr ) return newptr;
 
272
        assert( 0 );
 
273
        exit( EXIT_FAILURE );
271
274
#endif
272
275
 
273
276
        /* ber_set_option calls us like this */
274
 
        if (!ctx) return ber_memalloc_x(size, NULL);
 
277
        if (!ctx) {
 
278
                newptr = ber_memalloc_x( size, NULL );
 
279
                if ( newptr ) return newptr;
 
280
                assert( 0 );
 
281
                exit( EXIT_FAILURE );
 
282
        }
275
283
 
276
284
        /* round up to doubleword boundary */
277
285
        size += sizeof(ber_len_t) + pad;
375
383
                return slap_sl_malloc(size, ctx);
376
384
 
377
385
#ifdef SLAP_NO_SL_MALLOC
378
 
        return ber_memrealloc_x( ptr, size, NULL );
 
386
        newptr = ber_memrealloc_x( ptr, size, NULL );
 
387
        if ( newptr ) return newptr;
 
388
        assert( 0 );
 
389
        exit( EXIT_FAILURE );
379
390
#endif
380
391
 
381
392
        /* Not our memory? */