Variable "name" going out of scope leaks the storage it points to if any
of the parse was done by incomplete.
Detected by Coverity Scan. Issue
1174204.
*name = (oid*)xrealloc(*name, sizeof(oid) * ((*nl) + 1));
(*name)[*nl] = atoi(s); // stops at the '.' delimiter
++(*nl);
- // exit with true when teh last octet has been parsed
+ // exit with true when the last octet has been parsed
if (s[len] == '\0')
return true;
s += len+1;
}
// if we aborted before the lst octet was found, return false.
+ safe_free(name);
return false;
}