Skip to content

Commit

Permalink
cfgt: free dest.s before return on error
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Apr 28, 2022
1 parent cacae7f commit 33921b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/cfgt/cfgt_int.c
Expand Up @@ -394,6 +394,7 @@ void cfgt_save_node(cfgt_node_p node)
LM_DBG("dir [%s] already exists\n", dest.s);
} else if(mkdir(dest.s, S_IRWXO | S_IXGRP | S_IRWXU) < 0) {
LM_ERR("failed to make directory: %s\n", strerror(errno));
pkg_free(dest.s);
return;
}
dest.s[dir] = '/';
Expand Down

0 comments on commit 33921b7

Please sign in to comment.