Browse Source

Backport fix from libucl.

pull/206/head
Vsevolod Stakhov 11 years ago
parent
commit
e1aaa10d62
  1. 7
      contrib/libucl/ucl_util.c

7
contrib/libucl/ucl_util.c

@ -917,6 +917,10 @@ ucl_include_file_single (const unsigned char *data, size_t len,
}
/* Restore old file vars */
if (parser->cur_file) {
free (parser->cur_file);
}
parser->cur_file = old_curfile;
DL_FOREACH_SAFE (parser->variables, cur_var, tmp_var) {
if (strcmp (cur_var->var, "CURDIR") == 0 && old_curdir) {
@ -938,9 +942,6 @@ ucl_include_file_single (const unsigned char *data, size_t len,
if (old_curdir) {
DL_APPEND (parser->variables, old_curdir);
}
if (old_curfile) {
free (old_curfile);
}
parser->state = prev_state;

Loading…
Cancel
Save