aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_oss.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-06 21:20:11 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-06 21:20:11 +0000
commiteb5d461ed4688cafadc76bebf329a2fae454dc12 (patch)
tree5503cb153c9de46c07e3a0a521cc996926ed375b /channels/chan_oss.c
parent125558c76fd4870a9133e4974cce6410c89a3593 (diff)
Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
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;
}