Skip to content

Commit

Permalink
pv: free var in case pkg alloc failure
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Jul 7, 2017
1 parent 080bffe commit 86e3494
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/pv/pv_svar.c
Expand Up @@ -66,6 +66,7 @@ script_var_t* add_var(str *name, int vtype)

if(it->name.s==0)
{
pkg_free(it);
LM_ERR("out of pkg mem!\n");
return 0;
}
Expand Down

0 comments on commit 86e3494

Please sign in to comment.