Summary: | ASTERISK-07966: [patch] Bogus ast_mutex_unlock | ||
Reporter: | Ben Hutchings (benh) | Labels: | |
Date Opened: | 2006-10-19 18:53:08 | Date Closed: | 2006-10-26 12:09:14 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_skinny |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) skinny8186.diff | |
Description: | In function get_input() in chan_skinny.c, at line 2875 in version 1.2.13, there is a call to ast_mutex_lock(&s->lock). However, this function is only called from skinny_session(), which is the main function of the thread, and neither of them lock this mutex. The resulting call to pthread_mutex_unlock() has undefined behaviour. I believe the call can simply be deleted, as the inbuf member of struct skinnysession does not appear to be shared between threads. | ||
Comments: | By: Anthony LaMantia (alamantia) 2006-10-20 11:37:30 yes, it looks like it can go away. nice catch. By: Serge Vecher (serge-v) 2006-10-25 12:00:57 is this ready for commit then? By: Anthony LaMantia (alamantia) 2006-10-25 15:39:42 yep. By: Serge Vecher (serge-v) 2006-10-26 10:30:20 do it! By: Jason Parker (jparker) 2006-10-26 12:09:13 Fixed in svn branch 1.2 in revision 46332. Not needed in 1.4/trunk. |