Skip to content
Snippets Groups Projects
Commit 0f621aa1 authored by Russell Bryant's avatar Russell Bryant
Browse files

check for failure after call to calloc() (issue #8295)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent ce40dc57
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,8 @@ char *find_var(const char *varname) /* the list should be pretty short, if there
void set_var(const char *varname, const char *varval)
{
struct varz *t = calloc(1,sizeof(struct varz));
if (!t)
return;
strcpy(t->varname, varname);
strcpy(t->varval, varval);
t->next = global_varlist;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment