* init pointer to NULL, try not to free null pointers. this won't be fixeable it...
authorWilfried Göesgens <willi@citadel.org>
Sun, 21 Feb 2010 20:04:39 +0000 (20:04 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 21 Feb 2010 20:04:39 +0000 (20:04 +0000)
webcit/roomops.c

index 3d5f7c560c494f2de158db9f3316fbfad1996990..06a758d47769146d90ea1a886f8cdddf6c8a49d1 100644 (file)
@@ -1074,7 +1074,7 @@ void display_editroom(void)
        int i, j;
        char *tab;
        char *shared_with;
-       char *not_shared_with;
+       char *not_shared_with = NULL;
        int roompolicy = 0;
        int roomvalue = 0;
        int floorpolicy = 0;
@@ -1619,7 +1619,9 @@ void display_editroom(void)
                wc_printf("</div>");
        }
 
-       free (not_shared_with);
+       if (not_shared_with != NULL)
+               free (not_shared_with);
+
        /* Mailing list management */
        if (!strcmp(tab, "listserv")) {
                room_states RoomFlags;