diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2019-11-12 15:25:16 +1000 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2019-12-24 09:50:03 +0200 |
commit | bb7551a64960bb7499427a9bb280d262f585fc03 (patch) | |
tree | 306bc7e2333c67a2b1abe56f7f44c39923c86133 /src | |
parent | d9b9885624d38a2c253428fce94ad2d67aea7667 (diff) | |
download | xorg-lib-libxkbcommon-bb7551a64960bb7499427a9bb280d262f585fc03.tar.gz |
rules: simplify an error path
Initialize to NULL so we don't have to care about whether the cleanups can be
called or not.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/xkbcomp/rules.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xkbcomp/rules.c b/src/xkbcomp/rules.c index 30c2f45..ba40d91 100644 --- a/src/xkbcomp/rules.c +++ b/src/xkbcomp/rules.c @@ -1034,8 +1034,8 @@ xkb_components_from_rules(struct xkb_context *ctx, { bool ret = false; FILE *file; - char *path; - struct matcher *matcher; + char *path = NULL; + struct matcher *matcher = NULL; file = FindFileInXkbPath(ctx, rmlvo->rules, FILE_TYPE_RULES, &path); if (!file) @@ -1050,8 +1050,8 @@ xkb_components_from_rules(struct xkb_context *ctx, if (!ret) log_err(ctx, "No components returned from XKB rules \"%s\"\n", path); +err_out: matcher_free(matcher); free(path); -err_out: return ret; } |