Fixed a couple of memory leaks detected by Valgrind.
[citadel.git] / webcit / roomops.c
index 382339e43e6da6f4a31d7c3e7b94d4ef6aa318ee..8fe2b827704aecfda2c2cfc3a2f8d3cd2fe0f3da 100644 (file)
@@ -70,6 +70,25 @@ void load_floorlist(void)
 }
 
 
+/**
+ * \brief      Free a session's march list
+ *
+ * \param      wcf             Pointer to session being cleared
+ */
+void free_march_list(struct wcsession *wcf)
+{
+       struct march *mptr;
+
+       while (wcf->march == NULL) {
+               mptr = wcf->march->next;
+               free(wcf->march);
+               wcf->march = mptr;
+       }
+
+}
+
+
+
 /**
  * \brief remove a room from the march list
  */
@@ -742,7 +761,7 @@ char *pop_march(int desired_floor)
  */
 void gotonext(void)
 {
-       char buf[SIZ];
+       char buf[256];
        struct march *mptr, *mptr2;
        char next_room[128];