* Simple list management for notify list
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <string.h>
#include "misc.h"
NL_TIMES(new) = MAX_TRIES;
NL_STATE(new) = state;
if (!(NL_MY_NAME(new) = xstrdup(my_name))
- || !(NL_MON_NAME(new) = xstrdup(mon_name)))
+ || !(NL_MON_NAME(new) = xstrdup(mon_name))) {
+ if (NL_MY_NAME(new))
+ free(NL_MY_NAME(new));
+ free(new);
return NULL;
+ }
return new;
}