Fixes Coverity CID 709356: Data race condition (MISSING_LOCK)
Accessing variable "self->types" (mlt_property_s.types) requires the mlt_property_s.mutex lock.
871 self->types |= mlt_prop_string;
// Set the new locale
setlocale( LC_NUMERIC, localename );
}
+ else
+ {
+ // Make sure we have a lock before accessing self->types
+ pthread_mutex_lock( &self->mutex );
+ }
// Convert number to string
if ( self->types & mlt_prop_int )
free( orig_localename );
pthread_mutex_unlock( &self->mutex );
}
+ else
+ {
+ // Make sure we have a lock before accessing self->types
+ pthread_mutex_unlock( &self->mutex );
+ }
// Return the string (may be NULL)
return self->prop_string;