-
Notifications
You must be signed in to change notification settings - Fork 549
Closed
Description
Dear developers:
First, thank you for your checking. In the method, netcam_cleanup, the lock &netcam->mutex may not be released correctly if the branch condition satisfies. The fix is to insert the pthread_mutex_unlock(&netcam->mutex); before returning.
Line 465 in 34091a7
| pthread_mutex_lock(&netcam->mutex); |
Line 467 in 34091a7
| if (netcam->cnt->netcam == NULL) { |
void netcam_cleanup(netcam_context_ptr netcam, int init_retry_flag)
{
struct timespec waittime;
if (!netcam) {
return;
}
/*
* This 'lock' is just a bit of "defensive" programming. It should
* only be necessary if the routine is being called from different
* threads, but in our Motion design, it should only be called from
* the motion main-loop.
*/
pthread_mutex_lock(&netcam->mutex);
if (netcam->cnt->netcam == NULL) {
return; //return but the lock is not released
}
...;
}
Best,
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels