summaryrefslogtreecommitdiff
path: root/channels/chan_oss.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2007-06-06 21:20:11 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2007-06-06 21:20:11 +0000
commit9d05ff8ed5f2c898370896ff7a8bb67885596ba1 (patch)
tree5503cb153c9de46c07e3a0a521cc996926ed375b /channels/chan_oss.c
parent033a3df22aa68f04327066e0567b76f73c437651 (diff)
Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_oss.c')
-rw-r--r--channels/chan_oss.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 4308e837d..b101ed8ff 100644
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -1306,7 +1306,7 @@ static char *console_dial(struct ast_cli_entry *e, int cmd, struct ast_cli_args
} else
ast_cli(a->fd, "No such extension '%s' in context '%s'\n", mye, myc);
if (s)
- free(s);
+ ast_free(s);
return CLI_SUCCESS;
}
@@ -1362,7 +1362,7 @@ static int console_transfer(int fd, int argc, char *argv[])
ast_cli(fd, "Failed to transfer :(\n");
}
if (tmp)
- free(tmp);
+ ast_free(tmp);
return RESULT_SUCCESS;
}
@@ -1470,7 +1470,7 @@ static void store_mixer(struct chan_oss_pvt *o, char *s)
}
}
if (o->mixer_cmd)
- free(o->mixer_cmd);
+ ast_free(o->mixer_cmd);
o->mixer_cmd = ast_strdup(s);
ast_log(LOG_WARNING, "setting mixer %s\n", s);
}
@@ -1543,7 +1543,7 @@ static struct chan_oss_pvt *store_config(struct ast_config *cfg, char *ctg)
asprintf(&cmd, "mixer %s", o->mixer_cmd);
ast_log(LOG_WARNING, "running [%s]\n", cmd);
system(cmd);
- free(cmd);
+ ast_free(cmd);
}
if (o == &oss_default) /* we are done with the default */
return NULL;
@@ -1574,7 +1574,7 @@ static struct chan_oss_pvt *store_config(struct ast_config *cfg, char *ctg)
error:
if (o != &oss_default)
- free(o);
+ ast_free(o);
return NULL;
}