BOSA_AddComponentLoader increments the value of bosa_loaders variable as the first execution. If the realloc fails function returns with OMX_ErrorInsufficientResources but the value of bosa_loaders is never decremented. This will not cause any problems immediately but will leave holes in the loadersList array.
The correction should be:
if (!newLoadersList)
{
// Decrement the value
bosa_loaders--;
return OMX_ErrorInsufficientResources;
}