diff --git a/src/core/str_hash.h b/src/core/str_hash.h index 8c6589f4498..8755a6272c5 100644 --- a/src/core/str_hash.h +++ b/src/core/str_hash.h @@ -57,9 +57,10 @@ struct str_hash_table{ inline static int str_hash_alloc(struct str_hash_table* ht, int size) { ht->table=(struct str_hash_head*)pkg_malloc(sizeof(struct str_hash_head)*size); - if (ht->table==0) + if (ht->table==0) { PKG_MEM_ERROR; return -1; + } ht->size=size; return 0; } diff --git a/src/core/xavp.c b/src/core/xavp.c index 2680cf71fa0..2c725e92ee0 100644 --- a/src/core/xavp.c +++ b/src/core/xavp.c @@ -92,9 +92,10 @@ static sr_xavp_t *xavp_new_value(str *name, sr_xval_t *val) if(val->type == SR_XTYPE_STR) size += val->v.s.len + 1; avp = (sr_xavp_t*)shm_malloc(size); - if(avp==NULL) + if(avp==NULL) { SHM_MEM_ERROR; return NULL; + } memset(avp, 0, size); avp->id = id; avp->name.s = (char*)avp + sizeof(sr_xavp_t);