Janitor: use ast_free to pair calls of ast_malloc and ast_calloc
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 1 Nov 2007 06:07:18 +0000 (06:07 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 1 Nov 2007 06:07:18 +0000 (06:07 +0000)
Reported by: eliel
Patch by: eliel
Closes issue #11135

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88008 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_meetme.c
channels/chan_iax2.c

index 7b67d6b..1676b6d 100644 (file)
@@ -815,7 +815,7 @@ static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin
                ast_log(LOG_WARNING, "Unable to open pseudo device\n");
                if (cnf->fd >= 0)
                        close(cnf->fd);
-               free(cnf);
+               ast_free(cnf);
                cnf = NULL;
                goto cnfout;
        }
index d2707bc..dff41ec 100644 (file)
@@ -2206,7 +2206,7 @@ static void __attempt_transmit(const void *data)
                                                        /* Hangup the fd */
                                                        fr.frametype = AST_FRAME_CONTROL;
                                                        fr.subclass = AST_CONTROL_HANGUP;
-                                                       iax2_queue_frame(callno, &fr); // XXX
+                                                       iax2_queue_frame(callno, &fr); /* XXX */
                                                        /* Remember, owner could disappear */
                                                        if (iaxs[callno] && iaxs[callno]->owner)
                                                                iaxs[callno]->owner->hangupcause = AST_CAUSE_DESTINATION_OUT_OF_ORDER;
@@ -6037,7 +6037,7 @@ static int authenticate_reply(struct chan_iax2_pvt *p, struct sockaddr_in *sin,
                                }
                        }
                        if (prev)
-                               free(prev);
+                               ast_free(prev);
                        ies->vars = NULL;
                        ast_channel_datastore_add(p->owner, variablestore);
                } else {
@@ -7828,7 +7828,7 @@ static int socket_process(struct iax2_thread *thread)
                                                        }
                                                }
                                                if (prev)
-                                                       free(prev);
+                                                       ast_free(prev);
                                                ies.vars = NULL;
                                                ast_channel_datastore_add(c, variablestore);
                                        } else {
@@ -8586,7 +8586,7 @@ retryowner2:
                                                                                }
                                                                        }
                                                                        if (prev)
-                                                                               free(prev);
+                                                                               ast_free(prev);
                                                                        ies.vars = NULL;
                                                                        ast_channel_datastore_add(c, variablestore);
                                                                } else {