Skip to content

Commit

Permalink
lib: monkey: sync dev changes
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Sep 28, 2017
1 parent 01ffb69 commit 954bf6e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/monkey/mk_core/mk_rconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ static int mk_rconf_read(struct mk_rconf *conf, const char *path)
if (ret == -1) {
conf->level--;
fclose(f);
if (indent) {
mk_mem_free(indent);
}
return -1;
}
continue;
Expand All @@ -248,6 +251,9 @@ static int mk_rconf_read(struct mk_rconf *conf, const char *path)
ret = mk_rconf_meta_add(conf, buf, len);
if (ret == -1) {
fclose(f);
if (indent) {
mk_mem_free(indent);
}
return -1;
}
continue;
Expand Down Expand Up @@ -347,7 +353,9 @@ static int mk_rconf_read(struct mk_rconf *conf, const char *path)
fflush(stdout);
*/
fclose(f);
if (indent) mk_mem_free(indent);
if (indent) {
mk_mem_free(indent);
}

/* Append this file to the list */
file = mk_mem_alloc(sizeof(struct mk_rconf_file));
Expand Down

0 comments on commit 954bf6e

Please sign in to comment.