desktop-shell: Refactor launcher configuration reading to avoid leaking
authorRob Bradford <rob@linux.intel.com>
Fri, 26 Jul 2013 15:29:45 +0000 (16:29 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 30 Jul 2013 18:06:42 +0000 (11:06 -0700)
clients/desktop-shell.c

index eb550c8..ad324ba 100644 (file)
@@ -1205,15 +1205,13 @@ panel_add_launchers(struct panel *panel, struct desktop *desktop)
 
                if (icon != NULL && path != NULL) {
                        panel_add_launcher(panel, icon, path);
+                       count++;
                } else {
                        fprintf(stderr, "invalid launcher section\n");
-                       continue;
                }
 
                free(icon);
                free(path);
-
-               count++;
        }
 
        if (count == 0) {