]> git.mdlowis.com Git - proto/labwc.git/commitdiff
menu: try other paths (and fix memory leak) if fopen() fails
authorJohn Lindgren <john@jlindgren.net>
Mon, 8 Jul 2024 15:04:57 +0000 (11:04 -0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 8 Jul 2024 18:44:50 +0000 (19:44 +0100)
src/menu/menu.c

index d456fb01be59efe74499829c7c635ccb616fa3be..b38c25e1a60cdf77b5b3b24c36f954ce8fdecd1f 100644 (file)
@@ -671,7 +671,7 @@ parse_xml(const char *filename, struct server *server)
                struct path *path = wl_container_of(elm, path, link);
                FILE *stream = fopen(path->string, "r");
                if (!stream) {
-                       return;
+                       continue;
                }
                wlr_log(WLR_INFO, "read menu file %s", path->string);
                parse_stream(server, stream);