Skip to content

Commit

Permalink
app_python: fixed realloc size for local buf variables
Browse files Browse the repository at this point in the history
- removed unreachable code
  • Loading branch information
miconda committed Nov 1, 2016
1 parent 27ba383 commit 64d3d1d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions modules/app_python/apy_kemi.c
Expand Up @@ -542,8 +542,6 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int idx)
fname.len, fname.s);
return sr_kemi_apy_return_false();
}

return sr_kemi_apy_return_false();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion modules/app_python/python_support.c
Expand Up @@ -114,7 +114,7 @@ void python_handle_exception(const char *fmt, ...)
msglen = strlen(msg);
buflen += ++msglen;

buf = (char *)pkg_realloc(buf, buflen * sizeof(char *));
buf = (char *)pkg_realloc(buf, buflen * sizeof(char));
if (!buf)
{
LM_ERR("Can't allocate memory (%lu bytes), pkg_realloc() has failed."
Expand Down

0 comments on commit 64d3d1d

Please sign in to comment.