rem: ptr = (presentity_t*)shm_malloc(sizeof(presentity_t) + _uri->len); if (!ptr) {
add: presentity = (presentity_t*)shm_malloc(sizeof(presentity_t) + _uri->len); if (!presentity) {
context: int new_presentity(str* _uri, presentity_t** _p){	presentity_t* ptr;	if (!_uri || !_p) {		paerrno = PA_INTERNAL_ERROR;		LOG(L_ERR, "new_presentity(): Invalid parameter value\n");		return -1;	}	ptr = (presentity_t*)shm_malloc(sizeof(presentity_t) + _uri->len);	if (!ptr) {		paerrno = PA_NO_MEMORY;		LOG(L_ERR, "new_presentity(): No memory left\n");		return -1;	}	memset(ptr, 0, sizeof(presentity_t));	ptr->uri.s = (char*)ptr + sizeof(presentity_t);	memcpy(ptr->uri.s, _uri->s, _uri->len);	ptr->uri.len = _uri->len;	*_p = ptr;	return 0;}