mc_fbtrace_info_t* new_mc_fbtrace_info(int is_copy) { mc_fbtrace_info_t* fbt_i = calloc(1, sizeof(*fbt_i)); if (fbt_i == NULL) { return fbt_i; } fbt_i->_refcount = 1; if (!is_copy) { fbt_i->fbtrace = new_mc_fbtrace(); if (fbt_i->fbtrace == NULL) { free(fbt_i); return NULL; } } return fbt_i; }
mc_fbtrace_info_t* new_mc_fbtrace_info(int is_copy) { mc_fbtrace_info_t* fbt_i = calloc(1, sizeof(*fbt_i)); if (fbt_i == NULL) { dbg_debug("Error while allocating memory for mc_fbtrace_info_t object"); return fbt_i; } fbt_i->_refcount = 1; if (!is_copy) { fbt_i->fbtrace = new_mc_fbtrace(); if (fbt_i->fbtrace == NULL) { free(fbt_i); return NULL; } } return fbt_i; }