         if (a = (alarm *)malloc(sizeof(alarm))) {
           a->set = newalarm;
           a->active = true;
+          a->next = NULL;
           alarms.push(a);
         }
         setting = false;

  now = rtc.now(); // update the now

  // initialise the rest api  
  rest.function("setAlarm", setAlarm);
  rest.set_id("001");
  rest.set_name("SmartAlarm");


 * REST compatible function for setting an alarm
 * yyyy-mm-dd_hh:mm:ss
 */
int restSetAlarm(String command) {
  Serial.println(command);
  // delimiters
  command[4] = 0; command[7] = 0; command[10] = 0;
