Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/lib/util/talloc_stack.c

    r429 r745  
    6969{
    7070#if defined(PARANOID_MALLOC_CHECKER)
    71 #ifdef malloc
    72 #undef malloc
     71#ifdef calloc
     72#undef calloc
    7373#endif
    7474#endif
    75         struct talloc_stackframe *ts =
    76                 (struct talloc_stackframe *)malloc(sizeof(struct talloc_stackframe));
     75        struct talloc_stackframe *ts = (struct talloc_stackframe *)calloc(
     76                1, sizeof(struct talloc_stackframe));
    7777#if defined(PARANOID_MALLOC_CHECKER)
    78 #define malloc(s) __ERROR_DONT_USE_MALLOC_DIRECTLY
     78#define calloc(n, s) __ERROR_DONT_USE_MALLOC_DIRECTLY
    7979#endif
    8080
     
    8282                smb_panic("talloc_stackframe_init malloc failed");
    8383        }
    84 
    85         ZERO_STRUCTP(ts);
    8684
    8785        SMB_THREAD_ONCE(&ts_initialized, talloc_stackframe_init, NULL);
     
    103101                        break;
    104102                }
    105                 talloc_free(ts->talloc_stack[i]);
    106                 ts->talloc_stack[i] = NULL;
     103                TALLOC_FREE(ts->talloc_stack[i]);
    107104        }
    108105
Note: See TracChangeset for help on using the changeset viewer.