rem: shm_free(_c->received.s);
add: if (_c->received.s) shm_free(_c->received.s);
context: int mem_update_ucontact(ucontact_t* _c, time_t _e, qvalue_t _q, str* _cid, int _cs,			unsigned int _set, unsigned int _res, str* _ua, str* _recv){	char* ptr;		if (_c->callid.len < _cid->len) {		ptr = (char*)shm_malloc(_cid->len);		if (ptr == 0) {			LOG(L_ERR, "update_ucontact(): No memory left\n");			return -1;		}				memcpy(ptr, _cid->s, _cid->len);		shm_free(_c->callid.s);		_c->callid.s = ptr;	} else {		memcpy(_c->callid.s, _cid->s, _cid->len);	}	_c->callid.len = _cid->len;	if (_c->user_agent.len < _ua->len) {		ptr = (char*)shm_malloc(_ua->len);		if (ptr == 0) {			LOG(L_ERR, "update_ucontact(): No memory left\n");			return -1;		}		memcpy(ptr, _ua->s, _ua->len);		shm_free(_c->user_agent.s);		_c->user_agent.s = ptr;	} else {		memcpy(_c->user_agent.s, _ua->s, _ua->len);	}	_c->user_agent.len = _ua->len;	if (_recv) {		if (_c->received.len < _recv->len) {			ptr = (char*)shm_malloc(_recv->len);			if (ptr == 0) {				LOG(L_ERR, "update_ucontact(): No memory left\n");				return -1;			}						memcpy(ptr, _recv->s, _recv->len);			shm_free(_c->received.s);			_c->received.s = ptr;		} else {			memcpy(_c->received.s, _recv->s, _recv->len);		}		_c->received.len = _recv->len;	} else {		if (_c->received.s) shm_free(_c->received.s);		_c->received.s = 0;		_c->received.len = 0;	}	_c->expires = _e;	_c->q = _q;	_c->cseq = _cs;	_c->flags |= _set;	_c->flags &= ~_res;	return 0;}