~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to crypto/mem_dbg.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
330
330
        return(ret);
331
331
        }
332
332
 
333
 
int CRYPTO_push_info_(const char *info, const char *file, int line)
 
333
int CRYPTO_dbg_push_info(const char *info, const char *file, int line)
334
334
        {
335
335
        APP_INFO *ami, *amim;
336
336
        int ret=0;
380
380
        return(ret);
381
381
        }
382
382
 
383
 
int CRYPTO_pop_info(void)
 
383
int CRYPTO_dbg_pop_info(void)
384
384
        {
385
385
        int ret=0;
386
386
 
395
395
        return(ret);
396
396
        }
397
397
 
398
 
int CRYPTO_remove_all_info(void)
 
398
int CRYPTO_dbg_remove_all_info(void)
399
399
        {
400
400
        int ret=0;
401
401
 
793
793
        lh_doall_arg(mh, LHASH_DOALL_ARG_FN(cb_leak), &cb);
794
794
        CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC2);
795
795
        }
 
796
 
 
797
void CRYPTO_malloc_debug_init(void)
 
798
        {
 
799
        CRYPTO_set_mem_debug_functions(
 
800
                CRYPTO_dbg_malloc,
 
801
                CRYPTO_dbg_realloc,
 
802
                CRYPTO_dbg_free,
 
803
                CRYPTO_dbg_set_options,
 
804
                CRYPTO_dbg_get_options);
 
805
        CRYPTO_set_mem_info_functions(
 
806
                CRYPTO_dbg_push_info,
 
807
                CRYPTO_dbg_pop_info,
 
808
                CRYPTO_dbg_remove_all_info);
 
809
        }
 
810
 
 
811
char *CRYPTO_strdup(const char *str, const char *file, int line)
 
812
        {
 
813
        char *ret = CRYPTO_malloc(strlen(str)+1, file, line);
 
814
 
 
815
        strcpy(ret, str);
 
816
        return ret;
 
817
        }