mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 11:58:40 +00:00
Fix memory leak of sig_xxx private structures.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3394,12 +3394,11 @@ int analog_handle_init_event(struct analog_pvt *i, int event)
|
||||
}
|
||||
|
||||
|
||||
struct analog_pvt * analog_new(enum analog_sigtype signallingtype, struct analog_callback *c, void *private_data)
|
||||
struct analog_pvt *analog_new(enum analog_sigtype signallingtype, struct analog_callback *c, void *private_data)
|
||||
{
|
||||
struct analog_pvt *p;
|
||||
|
||||
p = ast_calloc(1, sizeof(*p));
|
||||
|
||||
if (!p) {
|
||||
return p;
|
||||
}
|
||||
@@ -3418,6 +3417,19 @@ struct analog_pvt * analog_new(enum analog_sigtype signallingtype, struct analog
|
||||
return p;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Delete the analog private structure.
|
||||
* \since 1.6.3
|
||||
*
|
||||
* \param doomed Analog private structure to delete.
|
||||
*
|
||||
* \return Nothing
|
||||
*/
|
||||
void analog_delete(struct analog_pvt *doomed)
|
||||
{
|
||||
ast_free(doomed);
|
||||
}
|
||||
|
||||
int analog_config_complete(struct analog_pvt *p)
|
||||
{
|
||||
/* No call waiting on non FXS channels */
|
||||
|
||||
Reference in New Issue
Block a user