Skip to content

Commit 898977f

Browse files
committed
union BUGFIX memory leak
1 parent d526c93 commit 898977f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/plugins_types/union.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ union_find_type(const struct ly_ctx *ctx, struct lysc_type_union *type_u, struct
395395
err_app_tag = NULL;
396396
}
397397
ret = ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, err_app_tag, "%s", msg);
398+
err_app_tag = NULL;
398399
} else if (type_idx) {
399400
*type_idx = u;
400401
}
@@ -405,6 +406,7 @@ union_find_type(const struct ly_ctx *ctx, struct lysc_type_union *type_u, struct
405406
}
406407
free(errs);
407408
free(msg);
409+
free(err_app_tag);
408410
ly_temp_log_options(prev_lo);
409411
return ret;
410412
}

0 commit comments

Comments
 (0)