summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchannels/chan_modem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_modem.c b/channels/chan_modem.c
index 677edd4fb..a911f41e1 100755
--- a/channels/chan_modem.c
+++ b/channels/chan_modem.c
@@ -712,8 +712,8 @@ static struct ast_modem_pvt *mkif(char *iface)
#endif
tmp = malloc(sizeof(struct ast_modem_pvt));
- memset(tmp, 0, sizeof(struct ast_modem_pvt));
if (tmp) {
+ memset(tmp, 0, sizeof(struct ast_modem_pvt));
tmp->fd = open(iface, O_RDWR | O_NONBLOCK);
if (tmp->fd < 0) {
ast_log(LOG_WARNING, "Unable to open '%s'\n", iface);