CID 22522, 22520 Resource leak

helping coverity scan to understand this code
This commit is contained in:
Enno Rehling 2015-11-09 20:05:55 +01:00
parent 66e43caf9d
commit e14cc50252
1 changed files with 1 additions and 0 deletions

View File

@ -187,6 +187,7 @@ resource_type *rt_get_or_create(const char *name) {
else { else {
rtype->_name = _strdup(name); rtype->_name = _strdup(name);
rt_register(rtype); rt_register(rtype);
return rt_find(name);
} }
} }
return rtype; return rtype;