Skip to content

Commit

Permalink
pv: free var in case pkg alloc failure
Browse files Browse the repository at this point in the history
(cherry picked from commit 86e3494)
  • Loading branch information
miconda committed Aug 30, 2017
1 parent 39956a5 commit 8872413
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 8872413

Please sign in to comment.